|
@@ -0,0 +1,58 @@
|
|
|
+package com.rongwei.zhsw.system.wechat.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.rongwe.zhsw.system.domain.SwUserRepairDo;
|
|
|
+import com.rongwei.rwcommon.base.BaseDo;
|
|
|
+import com.rongwei.rwcommon.base.R;
|
|
|
+import com.rongwei.rwcommoncomponent.file.service.impl.SysFileItemServiceImpl;
|
|
|
+import com.rongwei.zhsw.system.service.impl.SwFeedBackOpinionServiceImpl;
|
|
|
+import com.rongwei.zhsw.system.service.impl.SwUserRepairServiceImpl;
|
|
|
+import com.rongwei.zhsw.system.utils.WeChatUtils;
|
|
|
+import com.rongwei.zhsw.system.utils.ZhswCommonUtils;
|
|
|
+import com.rongwei.zhsw.system.wechat.WeChatMineService;
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+/**
|
|
|
+ * WeChatMineServiceImpl class
|
|
|
+ *
|
|
|
+ * @author XH
|
|
|
+ * @date 2025/03/17
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class WeChatMineServiceImpl implements WeChatMineService {
|
|
|
+ @Autowired
|
|
|
+ private SwUserRepairServiceImpl swUserRepairService;
|
|
|
+ @Autowired
|
|
|
+ private SwFeedBackOpinionServiceImpl swFeedBackOpinionService;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public R repairList() {
|
|
|
+ String currentWeChatOpenId = WeChatUtils.getCurrentWeChatOpenId();
|
|
|
+ List<SwUserRepairDo> list = swUserRepairService.list(new LambdaQueryWrapper<SwUserRepairDo>()
|
|
|
+ .eq(BaseDo::getDeleted, "0")
|
|
|
+ .eq(BaseDo::getCreateuserid, currentWeChatOpenId)
|
|
|
+ .orderByDesc(BaseDo::getCreatedate));
|
|
|
+ // 对附件信息数据进行处理
|
|
|
+ list.forEach(data->{
|
|
|
+ String images = data.getImages();
|
|
|
+ if(StringUtils.isBlank(images)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ String imgIds = Arrays.stream(images.split("\\^_\\^")).map(img -> img.split("-;-")[1]).collect(Collectors.joining(","));
|
|
|
+ data.setImages(imgIds);
|
|
|
+ });
|
|
|
+ return R.ok(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public R feedbackList() {
|
|
|
+ String currentWeChatOpenId = WeChatUtils.getCurrentWeChatOpenId();
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+}
|