| @@ -9,6 +9,7 @@ import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.WxBrand; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.enums.EnumDelFlag; | |||
| import com.iformall.enums.EnumYesOrNo; | |||
| import com.iformall.service.WxBrandService; | |||
| import com.iformall.service.WxMerchantService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| @@ -72,7 +73,7 @@ public class WxBrandController extends BaseController { | |||
| //判断是否解绑商户 | |||
| WxMerchant wxMerchant = new WxMerchant(); | |||
| wxMerchant.updateTenantInfo(wxBrand); | |||
| wxMerchant.setIsDel(0); | |||
| wxMerchant.setIsDel(EnumYesOrNo.NO.getCode()); | |||
| wxMerchant.setBrand(wxBrand.getId()); | |||
| List<WxMerchant> merchantList = wxMerchantService.findList(wxMerchant); | |||
| @@ -66,6 +66,7 @@ public class WxMerchantController extends BaseController { | |||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | |||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | |||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,true); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -83,6 +84,7 @@ public class WxMerchantController extends BaseController { | |||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | |||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | |||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,false); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -100,6 +102,7 @@ public class WxMerchantController extends BaseController { | |||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | |||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | |||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| final PageInfo<WxMerchant> page = wxMerchantService.listAsPage(wxMerchant, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -277,6 +280,7 @@ public class WxMerchantController extends BaseController { | |||
| public void exportData(@ModelAttribute WxMerchant wxMerchant, HttpServletRequest request, HttpServletResponse response) { | |||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | |||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| wxMerchantService.exportData(wxMerchant,request,response); | |||
| } | |||
| @@ -10,6 +10,7 @@ import java.util.Map; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import com.iformall.enums.*; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| @@ -41,16 +42,6 @@ import com.iformall.domain.po.WxRentContract; | |||
| import com.iformall.domain.po.WxShop; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.base.BaseEntity.SortField; | |||
| import com.iformall.enums.EnumContractOperationType; | |||
| import com.iformall.enums.EnumContractType; | |||
| import com.iformall.enums.EnumFlowContractType; | |||
| import com.iformall.enums.EnumFlowKey; | |||
| import com.iformall.enums.EnumFromType; | |||
| import com.iformall.enums.EnumIsPreview; | |||
| import com.iformall.enums.EnumRentContractAppStatus; | |||
| import com.iformall.enums.EnumRentContractStatus; | |||
| import com.iformall.enums.EnumRentShopType; | |||
| import com.iformall.enums.EnumRentStartType; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxBillPropertyMapper; | |||
| import com.iformall.mapper.WxBillRentMapper; | |||
| @@ -753,6 +744,7 @@ public class WxRentContractController extends WxContractBaseController { | |||
| WxMerchant wxMerchant = new WxMerchant(); | |||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| wxMerchant.setRentShopType(shopType); | |||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxMerchantService.getMerchantList(wxMerchant)); | |||
| } | |||
| @@ -8,6 +8,7 @@ import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.WxMerchantVo; | |||
| import com.iformall.enums.EnumMerchantPublic; | |||
| import com.iformall.enums.EnumMerchantStatus; | |||
| import com.iformall.enums.EnumYesOrNo; | |||
| import com.iformall.service.WxMerchantService; | |||
| import com.iformall.utils.HashUtil; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| @@ -43,6 +44,7 @@ public class WxMerchantController extends BaseController { | |||
| wxMerchantDto.updateTenantInfo(getTenantInfo()); | |||
| wxMerchantDto.setMerchantStatus(EnumMerchantStatus.VALID.getCode()); | |||
| wxMerchantDto.setIsPublic(EnumMerchantPublic.PUBLIC.getCode()); | |||
| wxMerchantDto.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| return new ResultData(wxMerchantService.listAsPageCVo(wxMerchantDto, pageNum, pageSize,true)); | |||
| } | |||
| @@ -37,6 +37,9 @@ public class WxMerchantDto extends TenantEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value = "是否显示在C端", name = "show") | |||
| private Integer isPublic; | |||
| @io.swagger.annotations.ApiModelProperty(value = "是否显示在广场", name = "isPrivate") | |||
| private Integer isPrivate; | |||
| @io.swagger.annotations.ApiModelProperty(value = "品牌名称", name = "brandName") | |||
| private String brandName; | |||
| @@ -153,9 +153,6 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| @Override | |||
| public PageInfo<WxMerchant> listAsPage(WxMerchant record, Integer pageIndex, Integer pageSize) { | |||
| if(record.getIsPrivate() == null){ | |||
| record.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| } | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantMapper.findList(record)); | |||
| } | |||
| @@ -275,9 +272,6 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| @Override | |||
| public List<WxMerchant> findList(WxMerchant record) { | |||
| if(record.getIsPrivate() == null){ | |||
| record.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| } | |||
| return wxMerchantMapper.findList(record); | |||
| } | |||
| @@ -285,9 +279,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| public List<WxMerchantSimpleVo> findList(TenantEntity tenantEntity) { | |||
| WxMerchant wxMerchant = new WxMerchant(); | |||
| wxMerchant.updateTenantInfo(tenantEntity); | |||
| if(wxMerchant.getIsPrivate() == null){ | |||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| } | |||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| wxMerchant.setStatus(EnumMerchantStatus.VALID.getCode()); | |||
| List<WxMerchant> wxMerchantList = wxMerchantMapper.findList(wxMerchant); | |||
| List<WxMerchantSimpleVo> collect = wxMerchantList.stream().map(x -> { | |||
| @@ -938,9 +930,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| @Override | |||
| public void exportData(WxMerchant wxMerchant, HttpServletRequest request, HttpServletResponse response) { | |||
| if(wxMerchant.getIsPrivate() == null){ | |||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| } | |||
| List<WxMerchant> list = wxMerchantMapper.findList(wxMerchant); | |||
| list.stream().forEach(m->{ | |||
| @@ -1183,9 +1173,6 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| @Override | |||
| public PageInfo<WxMerchant> listVoAsPage(WxMerchant record, Integer pageIndex, Integer pageSize,boolean hasRentContractInfo) { | |||
| if(record.getIsPrivate() == null){ | |||
| record.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| } | |||
| Map<Long,WxRentContract> merchantRentMap = new HashMap<Long,WxRentContract>(); | |||
| initQueryParam(record,hasRentContractInfo, merchantRentMap); | |||
| PageInfo<WxMerchant> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantMapper.findList(record)); | |||
| @@ -347,13 +347,18 @@ | |||
| <select id="getMerchantList" parameterType="com.iformall.domain.po.WxMerchant" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns"/> from wx_merchant m where m.is_del=0 and m.status=1 | |||
| select <include refid="allColumns"/> | |||
| from wx_merchant m | |||
| where m.is_del=0 and m.status=1 | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and m.`tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and m.`parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != isPrivate"> | |||
| and m.`is_private` = #{isPrivate} | |||
| </if> | |||
| order by m.create_date desc | |||
| </select> | |||
| @@ -17,6 +17,7 @@ import com.iformall.domain.vo.WxMerchantVo; | |||
| import com.iformall.enums.EnumAppPlat; | |||
| import com.iformall.enums.EnumMerchantStatus; | |||
| import com.iformall.enums.EnumPayWay; | |||
| import com.iformall.enums.EnumYesOrNo; | |||
| import com.iformall.service.QrCodeService; | |||
| import com.iformall.service.WxMerchantService; | |||
| import com.iformall.utils.Constant; | |||
| @@ -59,6 +60,7 @@ public class WxMerchantController extends BaseController { | |||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | |||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | |||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,false); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -76,6 +78,7 @@ public class WxMerchantController extends BaseController { | |||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | |||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | |||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,false); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -93,6 +96,7 @@ public class WxMerchantController extends BaseController { | |||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | |||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | |||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| final PageInfo<WxMerchant> page = wxMerchantService.listAsPage(wxMerchant, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -244,6 +248,7 @@ public class WxMerchantController extends BaseController { | |||
| public void exportData(@ModelAttribute WxMerchant wxMerchant, HttpServletRequest request, HttpServletResponse response) { | |||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | |||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| wxMerchantService.exportData(wxMerchant,request,response); | |||
| } | |||
| @@ -10,6 +10,7 @@ import com.iformall.domain.vo.WxMerchantVo; | |||
| import com.iformall.enums.EnumMerchantPublic; | |||
| import com.iformall.enums.EnumMerchantStatus; | |||
| import com.iformall.enums.EnumTtCouponStatus; | |||
| import com.iformall.enums.EnumYesOrNo; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.service.WxMerchantService; | |||
| import com.iformall.utils.HashUtil; | |||
| @@ -46,6 +47,7 @@ public class WxMerchantController extends BaseController { | |||
| wxMerchantDto.updateTenantInfo(getParentTenantInfo()); | |||
| wxMerchantDto.setMerchantStatus(EnumMerchantStatus.VALID.getCode()); | |||
| wxMerchantDto.setIsPublic(EnumMerchantPublic.PUBLIC.getCode()); | |||
| wxMerchantDto.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| return new ResultData(wxMerchantService.listAsPageCVo(wxMerchantDto, pageNum, pageSize,true)); | |||
| } | |||
| @@ -60,6 +62,7 @@ public class WxMerchantController extends BaseController { | |||
| merchant.updateTenantInfo(getParentTenantInfo()); | |||
| merchant.setStatus(EnumMerchantStatus.VALID.getCode()); | |||
| merchant.setIsPublic(EnumMerchantPublic.PUBLIC.getCode()); | |||
| merchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||
| return new ResultData(wxMerchantService.listAsPage(merchant, pageNum, pageSize)); | |||
| } | |||