zq-erp/src/main/java/com/matrix/system/app/action/ApiFollowupAction.java
@@ -1,28 +1,17 @@ package com.matrix.system.app.action; import com.matrix.core.constance.MatrixConstance; import com.matrix.core.exception.GlobleException; import com.matrix.core.pojo.AjaxResult; import com.matrix.core.pojo.PaginationVO; import com.matrix.core.tools.StringUtils; import com.matrix.core.tools.WebUtil; import com.matrix.system.app.dto.*; import com.matrix.system.app.vo.OrderDetailVo; import com.matrix.system.app.vo.ShoppingGoodsDetailVo; import com.matrix.system.app.vo.ShoppingGoodsListVo; import com.matrix.system.common.bean.SysUsers; import com.matrix.system.common.tools.DataAuthUtil; import com.matrix.system.hive.bean.*; import com.matrix.system.hive.dao.SysFollowupCommentDao; import com.matrix.system.hive.dao.SysFollowupDao; import com.matrix.system.hive.dao.SysVipAlbumDao; import com.matrix.system.hive.dao.SysVipInfoDao; import com.matrix.system.hive.plugin.util.CollectionUtils; import com.matrix.system.hive.pojo.ShoppingCarItem; import com.matrix.system.hive.pojo.ShoppingCarItemsVo; import com.matrix.system.hive.service.ShoppingGoodsCategoryService; import com.matrix.system.hive.service.ShoppingGoodsService; import com.matrix.system.hive.service.SysOrderService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; @@ -135,13 +124,13 @@ @ApiResponse(code = 200, message = "ok", response = SysFollowup.class) }) @PostMapping(value = "/findFollowup") public AjaxResult findFollowup(@RequestBody @Validated FollowupCommonetListDto followupCommonetListDto) { public AjaxResult findFollowup(@RequestBody @Validated FollowupListDto followupListDto) { SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); followupCommonetListDto.setShopId(user.getShopId()); followupCommonetListDto.setCompanyId(user.getCompanyId()); followupCommonetListDto.setSelfStaff(user.getSuId()); followupListDto.setShopId(user.getShopId()); followupListDto.setCompanyId(user.getCompanyId()); followupListDto.setSelfStaff(user.getSuId()); //TODO 需要设置跨店数据权限 List<SysFollowup> rows= followupDao.selectByAppDto(followupCommonetListDto); List<SysFollowup> rows= followupDao.selectByAppDto(followupListDto); return AjaxResult.buildSuccessInstance(rows,"查询成功"); } zq-erp/src/main/java/com/matrix/system/app/dto/FollowupListDto.java
File was renamed from zq-erp/src/main/java/com/matrix/system/app/dto/FollowupCommonetListDto.java @@ -15,7 +15,7 @@ * @date 2020-12-23 **/ @ApiModel(value = "FollowupCommonetListDto", description = "跟进记录查询参数") public class FollowupCommonetListDto { public class FollowupListDto { @NotNull(message = "参数错误") @ApiModelProperty(value = "查询条数", example = "10") zq-erp/src/main/java/com/matrix/system/hive/bean/SysFollowup.java
@@ -118,6 +118,42 @@ @ApiModelProperty(value = "评论集合",example ="") private List<SysFollowupComment> followupComments; @Extend @ApiModelProperty(value = "员工名称",example ="") private String staffName; @Extend @ApiModelProperty(value = "员工头像",example ="") private String staffPhoto; @Extend @ApiModelProperty(value = "客户名称",example ="") private String vipName; public String getStaffName() { return staffName; } public void setStaffName(String staffName) { this.staffName = staffName; } public String getStaffPhoto() { return staffPhoto; } public void setStaffPhoto(String staffPhoto) { this.staffPhoto = staffPhoto; } public String getVipName() { return vipName; } public void setVipName(String vipName) { this.vipName = vipName; } public List<SysFollowupComment> getFollowupComments() { return followupComments; } zq-erp/src/main/java/com/matrix/system/hive/dao/SysFollowupDao.java
@@ -1,6 +1,6 @@ package com.matrix.system.hive.dao; import com.matrix.system.app.dto.FollowupCommonetListDto; import com.matrix.system.app.dto.FollowupListDto; import org.apache.ibatis.annotations.Param; import java.util.List; import java.util.Map; @@ -40,5 +40,5 @@ void updateZan(@Param("id")Long id, @Param("zans")String zans); List<SysFollowup> selectByAppDto(FollowupCommonetListDto followupCommonetListDto); List<SysFollowup> selectByAppDto(FollowupListDto followupListDto); } zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml
@@ -22,6 +22,10 @@ <result property="orderAbstract" column="order_abstract" /> <result property="zans" column="zans" /> <result property="staffPhoto" column="staffPhoto" /> <result property="staffName" column="staffName" /> <result property="vipName" column="vipName" /> <collection property="albums" column="{sourceId=id}" select="com.matrix.system.hive.dao.SysVipAlbumDao.selectBySourceId" /> <collection property="followupComments" column="{follId=id}" select="com.matrix.system.hive.dao.SysFollowupCommentDao.selectByfollId" ></collection> @@ -341,32 +345,38 @@ <select id="selectByAppDto" resultMap="SysFollowupMap"> select * from sys_followup select a.*, b.su_photo as staffPhoto, b.su_name as staffName, c.vip_name as vipName from sys_followup a left join sys_users b on a.staff_id= b.su_id left join sys_vip_info c on a.vip_id=c.id <where> and company_id=#{companyId} and a.company_id=#{companyId} <if test="shopId != null "> and shop_id=#{shopId} and a.shop_id=#{shopId} </if> <if test="queryType == 1 "> and (visible=1 or ( visible!=1 and staff_id=#{selfStaff})) and (visible=1 or ( visible!=1 and a.staff_id=#{selfStaff})) </if> <if test="queryType == 2 "> and staff_id=#{selfStaff} and a.staff_id=#{selfStaff} </if> <if test="queryType == 3 "> and( visible=1 and staff_id!=#{selfStaff}) and( visible=1 and a.staff_id!=#{selfStaff}) </if> <if test="startTime != null "> and create_time <![CDATA[ >= ]]> #{startTime} and a.create_time <![CDATA[ >= ]]> #{startTime} </if> <if test="endTime != null "> and create_time <![CDATA[ <= ]]> #{endTime} and a.create_time <![CDATA[ <= ]]> #{endTime} </if> <if test="vipIds!=null and vipIds.size()!=0"> and vip_id in and a.vip_id in <foreach collection="vipIds" index="index" item="item" open="(" separator="," close=")"> #{item} @@ -374,7 +384,7 @@ </if> <if test="staffIds!=null and staffIds.size()!=0"> and staff_id in and a.staff_id in <foreach collection="staffIds" index="index" item="item" open="(" separator="," close=")"> #{item} zq-xcx/project.config.json
@@ -28,13 +28,15 @@ "disablePlugins": [], "outputPath": "" }, "enableEngineNative": false, "useIsolateContext": true, "useCompilerModule": true, "userConfirmedUseCompilerModuleSwitch": false, "userConfirmedBundleSwitch": false, "packNpmManually": false, "packNpmRelationList": [], "enableEngineNative": false, "minifyWXSS": true "minifyWXSS": true, "bundle": false }, "compileType": "miniprogram", "libVersion": "1.9.98",