|
|
|
@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxMsg; |
|
|
|
import com.iformall.service.WxCUserTagsService; |
|
|
|
import com.iformall.service.WxMsgService; |
|
|
|
import com.iformall.utils.Constant; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
@@ -18,6 +19,8 @@ import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
import java.io.FileOutputStream; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.UUID; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@@ -28,6 +31,9 @@ public class WxMsgController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private WxMsgService wxMsgService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxCUserTagsService wxCUserTagsService; |
|
|
|
|
|
|
|
@ApiOperation("分页列表接口") |
|
|
|
@GetMapping("list") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@@ -70,7 +76,17 @@ public class WxMsgController extends BaseController { |
|
|
|
@GetMapping("/findById") |
|
|
|
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) |
|
|
|
public ResultData findById(Long id) { |
|
|
|
return new ResultData(Result.SUCCESS, "查询成功", wxMsgService.getById(id)); |
|
|
|
WxMsg wxMsg = wxMsgService.getById(id); |
|
|
|
String label = wxMsg.getLabel(); |
|
|
|
if (label != null && !label.isEmpty()) { |
|
|
|
String[] arys = label.split(","); |
|
|
|
List<Long> tagids = new ArrayList<>(); |
|
|
|
for (int i = 0; i < arys.length; i++) { |
|
|
|
tagids.add(Long.parseLong(arys[i])); |
|
|
|
} |
|
|
|
wxMsg.setTagsList(wxCUserTagsService.findTagList(getTenantId(), tagids)); |
|
|
|
} |
|
|
|
return new ResultData(wxMsg); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|