| @@ -54,6 +54,7 @@ public class WxLegionActivityUserController extends BaseController { | |||||
| } | } | ||||
| TenantEntity tenantInfo = getTenantInfo(); | TenantEntity tenantInfo = getTenantInfo(); | ||||
| wxLegionActivityUser.updateTenantInfo(tenantInfo); | wxLegionActivityUser.updateTenantInfo(tenantInfo); | ||||
| wxLegionActivityUser.setStatus(EnumLegionActivityUserStatus.VALID.getCode()); | |||||
| wxLegionActivityUser.setSortColumns(SortField.CreateDate_DESC); | wxLegionActivityUser.setSortColumns(SortField.CreateDate_DESC); | ||||
| final PageInfo<WxLegionActivityUser> page = wxLegionActivityUserService.listAsPage(wxLegionActivityUser, pageNum, pageSize); | final PageInfo<WxLegionActivityUser> page = wxLegionActivityUserService.listAsPage(wxLegionActivityUser, pageNum, pageSize); | ||||
| @@ -81,6 +82,9 @@ public class WxLegionActivityUserController extends BaseController { | |||||
| if(wxLegionActivityUser.getId() == null){ | if(wxLegionActivityUser.getId() == null){ | ||||
| return new ResultData(Result.ERROR,"ID不能为空"); | return new ResultData(Result.ERROR,"ID不能为空"); | ||||
| } | } | ||||
| if(wxLegionActivityUser.getMerchantId() == null){ | |||||
| return new ResultData(Result.ERROR,"商户ID不能为空"); | |||||
| } | |||||
| TenantEntity tenantEntity = getTenantInfo(); | TenantEntity tenantEntity = getTenantInfo(); | ||||
| wxLegionActivityUser.updateTenantInfo(tenantEntity); | wxLegionActivityUser.updateTenantInfo(tenantEntity); | ||||
| @@ -52,8 +52,9 @@ public class WxLegionActivityUserController extends BaseController { | |||||
| } | } | ||||
| TenantEntity tenantInfo = getTenantInfo(); | TenantEntity tenantInfo = getTenantInfo(); | ||||
| wxLegionActivityUser.updateTenantInfo(tenantInfo); | wxLegionActivityUser.updateTenantInfo(tenantInfo); | ||||
| wxLegionActivityUser.setSortColumns(SortField.CreateDate_DESC); | |||||
| wxLegionActivityUser.setMerchantId(getLoginBUser().getMerchantId()); | wxLegionActivityUser.setMerchantId(getLoginBUser().getMerchantId()); | ||||
| wxLegionActivityUser.setStatus(EnumLegionActivityUserStatus.VALID.getCode()); | |||||
| wxLegionActivityUser.setSortColumns(SortField.CreateDate_DESC); | |||||
| final PageInfo<WxLegionActivityUser> page = wxLegionActivityUserService.listAsPage(wxLegionActivityUser, pageNum, pageSize); | final PageInfo<WxLegionActivityUser> page = wxLegionActivityUserService.listAsPage(wxLegionActivityUser, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -40,7 +40,7 @@ public class WxLegionActivityUser extends TenantEntity { | |||||
| /** | /** | ||||
| * 用户手机号 | * 用户手机号 | ||||
| */ | */ | ||||
| @Excel(name = "用户手机号", width = 20, orderNum = "1") | |||||
| @Excel(name = "用户手机号", width = 20, orderNum = "5") | |||||
| @io.swagger.annotations.ApiModelProperty(value="用户手机号",name="phone") | @io.swagger.annotations.ApiModelProperty(value="用户手机号",name="phone") | ||||
| @TableField(value = "phone") | @TableField(value = "phone") | ||||
| private String phone; | private String phone; | ||||
| @@ -48,7 +48,7 @@ public class WxLegionActivityUser extends TenantEntity { | |||||
| /** | /** | ||||
| * 用户姓名 | * 用户姓名 | ||||
| */ | */ | ||||
| @Excel(name = "用户姓名", width = 20, orderNum = "3") | |||||
| @Excel(name = "用户姓名", width = 20, orderNum = "4") | |||||
| @io.swagger.annotations.ApiModelProperty(value="用户姓名",name="phone") | @io.swagger.annotations.ApiModelProperty(value="用户姓名",name="phone") | ||||
| @TableField(value = "name") | @TableField(value = "name") | ||||
| private String name; | private String name; | ||||
| @@ -56,7 +56,7 @@ public class WxLegionActivityUser extends TenantEntity { | |||||
| /** | /** | ||||
| * 用户地址 | * 用户地址 | ||||
| */ | */ | ||||
| @Excel(name = "用户地址", width = 20, orderNum = "4") | |||||
| @Excel(name = "用户地址", width = 20, orderNum = "6") | |||||
| @io.swagger.annotations.ApiModelProperty(value="用户地址",name="address") | @io.swagger.annotations.ApiModelProperty(value="用户地址",name="address") | ||||
| @TableField(value = "address") | @TableField(value = "address") | ||||
| private String address; | private String address; | ||||
| @@ -64,7 +64,7 @@ public class WxLegionActivityUser extends TenantEntity { | |||||
| /** | /** | ||||
| * 会员卡号 | * 会员卡号 | ||||
| */ | */ | ||||
| @Excel(name = "会员卡号", width = 20, orderNum = "2") | |||||
| @Excel(name = "会员卡号", width = 20, orderNum = "1") | |||||
| @io.swagger.annotations.ApiModelProperty(value="会员卡号",name="vipNum") | @io.swagger.annotations.ApiModelProperty(value="会员卡号",name="vipNum") | ||||
| @TableField(value = "vip_num") | @TableField(value = "vip_num") | ||||
| private String vipNum; | private String vipNum; | ||||
| @@ -75,9 +75,12 @@ public class WxLegionActivityUser extends TenantEntity { | |||||
| @TableField(value = "merchant_id") | @TableField(value = "merchant_id") | ||||
| private Long merchantId; | private Long merchantId; | ||||
| @Excel(name = "商户名称", width = 20, orderNum = "5") | |||||
| @Excel(name = "商户名称", width = 20, orderNum = "7") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String merchantName; | private String merchantName; | ||||
| @Excel(name="商铺号",width = 20,orderNum = "8") | |||||
| @TableField(exist = false) | |||||
| private String shopNumber; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<Long> merchantIdList; | private List<Long> merchantIdList; | ||||
| @@ -87,7 +90,7 @@ public class WxLegionActivityUser extends TenantEntity { | |||||
| */ | */ | ||||
| @TableField(value = "legion_id") | @TableField(value = "legion_id") | ||||
| private Long legionId; | private Long legionId; | ||||
| @Excel(name = "所属军团", width = 20, orderNum = "6") | |||||
| @Excel(name = "所属军团", width = 20, orderNum = "2") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String legionName; | private String legionName; | ||||
| @@ -96,14 +99,14 @@ public class WxLegionActivityUser extends TenantEntity { | |||||
| */ | */ | ||||
| @TableField(value = "union_id") | @TableField(value = "union_id") | ||||
| private Long unionId; | private Long unionId; | ||||
| @Excel(name = "所属联盟", width = 20, orderNum = "7") | |||||
| // @Excel(name = "所属联盟", width = 20, orderNum = "3") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String unionName; | private String unionName; | ||||
| /** | /** | ||||
| * 状态 | * 状态 | ||||
| */ | */ | ||||
| @Excel(name = "状态", width = 20, orderNum = "8", replace = {"已绑定_0", "已失效_1"}) | |||||
| // @Excel(name = "状态", width = 20, orderNum = "9", replace = {"已绑定_0", "已失效_1"}) | |||||
| @TableField(value = "status") | @TableField(value = "status") | ||||
| private Integer status; | private Integer status; | ||||
| @@ -116,7 +119,7 @@ public class WxLegionActivityUser extends TenantEntity { | |||||
| /** | /** | ||||
| * 创建时间 | * 创建时间 | ||||
| */ | */ | ||||
| @Excel(name = "提交时间", format = "yyyy-MM-dd HH:mm:ss", width = 20, orderNum = "9") | |||||
| @Excel(name = "提交时间", format = "yyyy-MM-dd HH:mm:ss", width = 20, orderNum = "10") | |||||
| @TableField(value = "create_date") | @TableField(value = "create_date") | ||||
| private Date createDate; | private Date createDate; | ||||
| @@ -11,12 +11,10 @@ import com.iformall.domain.po.*; | |||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.enums.EnumLegionActivityOrderStatus; | import com.iformall.enums.EnumLegionActivityOrderStatus; | ||||
| import com.iformall.enums.EnumLegionActivityUserStatus; | import com.iformall.enums.EnumLegionActivityUserStatus; | ||||
| import com.iformall.enums.EnumYesOrNo; | |||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.mapper.*; | import com.iformall.mapper.*; | ||||
| import com.iformall.service.ExcelService; | |||||
| import com.iformall.service.WxLegionActivityConfigService; | |||||
| import com.iformall.service.WxLegionActivityUserService; | |||||
| import com.iformall.service.WxMerchantService; | |||||
| import com.iformall.service.*; | |||||
| import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| @@ -57,6 +55,9 @@ public class WxLegionActivityUserServiceImpl implements WxLegionActivityUserServ | |||||
| @Autowired | @Autowired | ||||
| private WxMerchantService wxMerchantService; | private WxMerchantService wxMerchantService; | ||||
| @Autowired | |||||
| private WxShopService wxShopService; | |||||
| @Autowired | @Autowired | ||||
| private ExcelService excelService; | private ExcelService excelService; | ||||
| @@ -93,6 +94,7 @@ public class WxLegionActivityUserServiceImpl implements WxLegionActivityUserServ | |||||
| merchantQ.updateTenantInfo(wxLegionActivityUser); | merchantQ.updateTenantInfo(wxLegionActivityUser); | ||||
| merchantQ.setIds(merchantIds); | merchantQ.setIds(merchantIds); | ||||
| Map<Long, String> idAndNamesMap = wxMerchantService.getIdAndNamesMap(merchantQ); | Map<Long, String> idAndNamesMap = wxMerchantService.getIdAndNamesMap(merchantQ); | ||||
| Map<Long, String> merchantShopNumberMap = wxShopService.getMerchantShopNumberMap(wxLegionActivityUser, merchantIds, EnumYesOrNo.NO.getCode()); | |||||
| WxLegionActivityConfig legionConfigQ = new WxLegionActivityConfig(); | WxLegionActivityConfig legionConfigQ = new WxLegionActivityConfig(); | ||||
| legionConfigQ.updateTenantInfo(wxLegionActivityUser); | legionConfigQ.updateTenantInfo(wxLegionActivityUser); | ||||
| @@ -101,6 +103,7 @@ public class WxLegionActivityUserServiceImpl implements WxLegionActivityUserServ | |||||
| for (WxLegionActivityUser legionActivityUser : wxLegionActivityUsers) { | for (WxLegionActivityUser legionActivityUser : wxLegionActivityUsers) { | ||||
| legionActivityUser.setMerchantName(idAndNamesMap.get(legionActivityUser.getMerchantId())); | legionActivityUser.setMerchantName(idAndNamesMap.get(legionActivityUser.getMerchantId())); | ||||
| legionActivityUser.setShopNumber(merchantShopNumberMap.get(legionActivityUser.getMerchantId())); | |||||
| if(legionActivityUser.getLegionId().equals(0L)){ | if(legionActivityUser.getLegionId().equals(0L)){ | ||||
| legionActivityUser.setLegionName("未参加活动"); | legionActivityUser.setLegionName("未参加活动"); | ||||