Explorar el Código

fix

release_toaliyun_real
winter hace 1 año
padre
commit
81230f4c20
Se han modificado 6 ficheros con 52 adiciones y 30 borrados
  1. +28
    -30
      mallinkAdmin/src/main/java/com/iformall/controller/basic/WxMerchantController.java
  2. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java
  3. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxMerchantService.java
  4. +1
    -0
      mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java
  5. +13
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java
  6. +4
    -0
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

+ 28
- 30
mallinkAdmin/src/main/java/com/iformall/controller/basic/WxMerchantController.java Ver fichero

@@ -13,6 +13,7 @@ import com.iformall.domain.po.WxAppinfo;
import com.iformall.domain.po.WxMerchant;
import com.iformall.domain.po.WxMerchantRelation;
import com.iformall.domain.po.WxPayAccount;
import com.iformall.domain.po.WxShop;
import com.iformall.domain.po.WxUserDataRule;
import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.vo.WxMerchantTradeDetailVo;
@@ -46,6 +47,10 @@ public class WxMerchantController extends BaseController {

@Autowired
private WxMerchantService wxMerchantService;
@Autowired
private WxMerchantService wxShopService;
@Autowired
private QrCodeService qrCodeService;

@@ -68,7 +73,6 @@ public class WxMerchantController extends BaseController {
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
@SystemControllerLog(description = "商户-列表")
public ResultData listVo(@ModelAttribute WxMerchant wxMerchant, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::list");
if (null == wxMerchant) wxMerchant = new WxMerchant();
@@ -91,7 +95,6 @@ public class WxMerchantController extends BaseController {
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
@SystemControllerLog(description = "商户-列表")
public ResultData listVo2(@ModelAttribute WxMerchant wxMerchant, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::list");
if (null == wxMerchant) wxMerchant = new WxMerchant();
@@ -115,7 +118,6 @@ public class WxMerchantController extends BaseController {

@ApiOperation("区域商户和普通商户关系新增或更新")
@PostMapping("saveOrUpdate")
@SystemControllerLog(description = "区域商户和普通商户关系新增或更新")
public ResultData saveOrUpdate(@RequestBody WxMerchantRelation wxMerchantRelation) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::saveOrUpdate");
if (null == wxMerchantRelation) wxMerchantRelation = new WxMerchantRelation();
@@ -126,7 +128,6 @@ public class WxMerchantController extends BaseController {
@ApiOperation("区域商户删除普通商户")
@GetMapping("/delByRegionId")
@ApiImplicitParam(name = "merchantId", value = "merchantId", dataType = "Long", paramType = "query", required = true)
@SystemControllerLog(description = "区域用户删除普通用户")
public ResultData delByRegionId(Long merchantId) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::delByRegionId");
wxMerchantRelationService.deleteByMerchantId(merchantId);
@@ -136,7 +137,6 @@ public class WxMerchantController extends BaseController {
@ApiOperation("区域商户和子商户列表")
@GetMapping("/relationList")
@ApiImplicitParam(name = "regionId", value = "regionId", dataType = "Long", paramType = "query", required = true)
@SystemControllerLog(description = "区域用户删除普通用户")
public ResultData relationList(Long regionId) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::relationList");
List<WxMerchant> merchants = wxMerchantService.relationList(regionId);
@@ -148,7 +148,6 @@ public class WxMerchantController extends BaseController {
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
@SystemControllerLog(description = "子商户列表查询")
public ResultData subMerchantList(@ModelAttribute WxMerchant wxMerchant, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::subMerchantList");
if (null == wxMerchant) wxMerchant = new WxMerchant();
@@ -163,7 +162,6 @@ public class WxMerchantController extends BaseController {
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true),
})
@SystemControllerLog(description = "商户-列表")
public ResultData list(@ModelAttribute WxMerchant wxMerchant, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::list");
if (null == wxMerchant) wxMerchant = new WxMerchant();
@@ -173,6 +171,29 @@ public class WxMerchantController extends BaseController {
final PageInfo<WxMerchant> page = wxMerchantService.listAsPage(wxMerchant, pageNum, pageSize);
return new ResultData(page);
}
@ApiOperation("根据关键字查询")
@GetMapping("search")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true),
})
public ResultData search(@ModelAttribute WxMerchant wxMerchant, Integer pageNum, Integer pageSize) {
if (null == wxMerchant) wxMerchant = new WxMerchant();
wxMerchant.updateTenantInfo(getTenantInfo());
WxShop sq = new WxShop();
sq.updateTenantInfo(wxMerchant);
sq.setShopNumber(wxMerchant.getSearchKey());
List<Long> ids = wxMerchantService.getShopMerchantIds(sq);
if (null != ids) {
wxMerchant.setIds(ids);
}
wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC);
wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode());
final PageInfo<WxMerchant> page = wxMerchantService.listAsPage(wxMerchant, pageNum, pageSize);
return new ResultData(page);
}

@TenantIgnore
@ApiOperation("分页列表接口")
@@ -181,7 +202,6 @@ public class WxMerchantController extends BaseController {
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true),
})
@SystemControllerLog(description = "商户-列表")
public ResultData parentList(@ModelAttribute WxMerchant wxMerchant, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::parentList");
if (null == wxMerchant) wxMerchant = new WxMerchant();
@@ -196,7 +216,6 @@ public class WxMerchantController extends BaseController {

@ApiOperation("获取商管商户")
@GetMapping("adminMerchantOne")
@SystemControllerLog(description = "商户-列表")
public ResultData adminMerchantOne() {
logger.debug("[" + getIpAddr() + "] WxMerchantController::adminMerchantOne");
WxMerchant wxMerchant = new WxMerchant();
@@ -218,7 +237,6 @@ public class WxMerchantController extends BaseController {
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)
})
@SystemControllerLog(description = "商户-列表")
public ResultData IdAndNamelist(Integer type,Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::list");
WxMerchant wxMerchant = new WxMerchant();
@@ -234,7 +252,6 @@ public class WxMerchantController extends BaseController {

@ApiOperation("ETCP商户列表")
@GetMapping("etcplist")
@SystemControllerLog(description = "商户-ETCP商户列表")
public ResultData etcpList(@ModelAttribute WxMerchant wxMerchant) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::etcpList");
if (null == wxMerchant) wxMerchant = new WxMerchant();
@@ -246,7 +263,6 @@ public class WxMerchantController extends BaseController {
@ApiOperation("根据id删除接口")
@GetMapping("/del")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)
@SystemControllerLog(description = "商户-删除")
public ResultData delete(Long id) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::delete");
wxMerchantService.deleteById(id);
@@ -256,7 +272,6 @@ public class WxMerchantController extends BaseController {
@ApiOperation("根据id查询接口")
@GetMapping("/findById")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)
@SystemControllerLog(description = "商户-查询")
public ResultData findById(Long id) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::findById");
WxMerchant wxMerchant = wxMerchantService.getById(id);
@@ -266,7 +281,6 @@ public class WxMerchantController extends BaseController {
@ApiOperation("停用")
@GetMapping("disable")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)
@SystemControllerLog(description = "商户-停用")
public ResultData disable(Long id) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::disable");
wxMerchantService.disable(id,this.getUser());
@@ -275,7 +289,6 @@ public class WxMerchantController extends BaseController {

@ApiOperation("新增商户接口")
@PostMapping("addMerchant")
@SystemControllerLog(description = "商户-新增")
public ResultData addMerchant(@RequestBody WxMerchant wxMerchant) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::addMerchant");
wxMerchant.updateTenantInfo(getTenantInfo());
@@ -291,7 +304,6 @@ public class WxMerchantController extends BaseController {
@ApiOperation("更新商户接口")
@PostMapping("updateMerchant")
@SystemControllerLog(description = "商户-更新")
public ResultData updateMerchant(@RequestBody WxMerchant wxMerchant) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchant");
wxMerchant.updateTenantInfo(getTenantInfo());
@@ -309,7 +321,6 @@ public class WxMerchantController extends BaseController {

@ApiOperation("更新管理员接口")
@PostMapping("updateMerchantAdmin")
@SystemControllerLog(description = "商户-更新管理员")
public ResultData updateMerchantAdmin(@RequestBody WxMerchant wxMerchant) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantAdmin");
wxMerchant.updateTenantInfo(getTenantInfo());
@@ -318,7 +329,6 @@ public class WxMerchantController extends BaseController {

@ApiOperation("更新法人接口")
@PostMapping("updateMerchantCorp")
@SystemControllerLog(description = "商户-更新法人")
public ResultData updateMerchantCopr(@RequestBody WxMerchant wxMerchant) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantCorp");
wxMerchant.updateTenantInfo(getTenantInfo());
@@ -327,7 +337,6 @@ public class WxMerchantController extends BaseController {

@ApiOperation("更新税务接口")
@PostMapping("updateMerchantTax")
@SystemControllerLog(description = "商户-更新税务")
public ResultData updateMerchantTax(@RequestBody WxMerchant wxMerchant) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantTax");
wxMerchant.updateTenantInfo(getTenantInfo());
@@ -336,7 +345,6 @@ public class WxMerchantController extends BaseController {

@ApiOperation("商户信息设置接口")
@PostMapping("updateMerchantLevel")
@SystemControllerLog(description = "商户-更新会员等级权益")
public ResultData updateMerchantLevel(@RequestBody WxMerchant wxMerchant) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantLevel");
wxMerchant.updateTenantInfo(getTenantInfo());
@@ -352,7 +360,6 @@ public class WxMerchantController extends BaseController {

@ApiOperation("查询当前租户下商户名称列表")
@GetMapping("/name_list")
@SystemControllerLog(description = "查询当前租户下商户名称列表")
public ResultData nameList() {
logger.debug("[" + getIpAddr() + "] WxMerchantController::name_list");
return new ResultData(wxMerchantService.findList(getTenantInfo()));
@@ -361,7 +368,6 @@ public class WxMerchantController extends BaseController {
@ApiOperation("根据id查询接口")
@GetMapping("/findMerchantById")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)
@SystemControllerLog(description = "商户-查询")
public ResultData findMerchantById(Long id) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::findMerchantById");
WxMerchantVo wxMerchant = wxMerchantService.findMerchantById(getTenantInfo(),id);
@@ -386,7 +392,6 @@ public class WxMerchantController extends BaseController {

@ApiOperation("置顶")
@PostMapping("top")
@SystemControllerLog(description = "商户-置顶")
public ResultData top(@RequestBody WxMerchant wxMerchant) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::top");
wxMerchant.updateTenantInfo(getTenantInfo());
@@ -404,7 +409,6 @@ public class WxMerchantController extends BaseController {

@ApiOperation("查看是否存在商户名称相同记录")
@GetMapping("/hasMerchant")
@SystemControllerLog(description = "商户-查看是否存在商户名称相同记录")
public ResultData hasMerchant(@ModelAttribute WxMerchant wxMerchant) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::hasMerchant");
wxMerchant.updateTenantInfo(getTenantInfo());
@@ -414,7 +418,6 @@ public class WxMerchantController extends BaseController {

@ApiOperation("查看是否存在商户名称相同记录")
@GetMapping("/hasMerchantEncode")
@SystemControllerLog(description = "商户-查看是否存在商户编码相同记录")
@TenantIgnore
public ResultData hasMerchantEncode(@ModelAttribute WxMerchant wxMerchant) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::hasMerchantEncode{}"+wxMerchant.toString());
@@ -427,7 +430,6 @@ public class WxMerchantController extends BaseController {
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
@SystemControllerLog(description = "商户-消费列表")
public ResultData userTradeList(@ModelAttribute WxMerchant wxMerchant, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::list");
if (null == wxMerchant) wxMerchant = new WxMerchant();
@@ -442,7 +444,6 @@ public class WxMerchantController extends BaseController {
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
@SystemControllerLog(description = "商户-商户会员消费明细列表接口")
public ResultData userTradeDetailList(@ModelAttribute WxMerchant wxMerchant, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::list");
if (null == wxMerchant) wxMerchant = new WxMerchant();
@@ -453,7 +454,6 @@ public class WxMerchantController extends BaseController {

@ApiOperation("导出商户会员消费分页列表")
@GetMapping("exportUserTradeDetailList")
@SystemControllerLog(description = "导出商户会员消费分页列表")
public void exportUserTradeList(@ModelAttribute WxMerchant wxMerchant,HttpServletRequest request, HttpServletResponse response) throws Exception{
logger.debug("[" + getIpAddr() + "] WxBusinessController::exportUserTradeDetailList");
if (null == wxMerchant) wxMerchant = new WxMerchant();
@@ -464,7 +464,6 @@ public class WxMerchantController extends BaseController {
@ApiOperation("刷新进件页面")
@GetMapping("/updateTtReceiver")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)
@SystemControllerLog(description = "商户-删除")
public ResultData updateTtReceiver(Long id) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::updateTtReceiver");
WxMerchant merchant = wxMerchantService.selectById(id);
@@ -505,7 +504,6 @@ public class WxMerchantController extends BaseController {
@ApiOperation("修改可用状态")
@GetMapping("/updateTtReceiverIsUse")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)
@SystemControllerLog(description = "商户-删除")
public ResultData updateTtReceiverIsUse(Long id) {
WxMerchant merchant = wxMerchantService.selectById(id);
if(merchant == null){


+ 4
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java Ver fichero

@@ -477,6 +477,8 @@ public class WxMerchant extends TenantEntity {
public Integer billType;
@TableField(exist = false)
public Long energyFeesId;
@TableField(exist = false)
public List<Long> energyFeesIdList;
@TableField(exist = false)
public Integer toPayMerchant;
@@ -486,5 +488,7 @@ public class WxMerchant extends TenantEntity {
public List<Long> feesIdList;
@TableField(exist = false)
public Long templateId;
@TableField(exist = false)
public String searchKey;
}

+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxMerchantService.java Ver fichero

@@ -228,4 +228,6 @@ public interface WxMerchantService {
List<ListMerchantVO> listMerchant(TenantEntity tenantEntity, ListMerchantDTO dto);
Map<Long,WxMerchant> getShopMerchantMap(WxShop wxShop);
List<Long> getShopMerchantIds(WxShop wxShop);
}

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java Ver fichero

@@ -102,6 +102,7 @@ public class WxBillAllHelper {
bill.setToPayMerchant(wxMerchant.getToPayMerchant());
bill.setIsPreview(wxMerchant.getIsPreview());
bill.setNeedPayNoDays(wxMerchant.getNeedPayNoDays());
bill.setEnergyFeesIds(wxMerchant.getEnergyFeesIdList());
}
public WxBillSum getBillSum(WxMerchant wxMerchant,Date starttime, Date enttime) {


+ 13
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Ver fichero

@@ -2382,4 +2382,17 @@ public class WxMerchantServiceImpl implements WxMerchantService {
}
return null;
}
@Override
public List<Long> getShopMerchantIds(WxShop wxShop) {
List<Long> shopIdList = wxShopMapper.findIdList(wxShop);
if (null == shopIdList || shopIdList.size() <= 0 ){
return null;
}
WxMerchantShop merchantShopQ = new WxMerchantShop();
merchantShopQ.updateTenantInfo(wxShop);
merchantShopQ.setShopIdList(shopIdList);
merchantShopQ.setIsDel(0);
return wxMerchantShopMapper.findMerchantIdList(merchantShopQ);
}
}

+ 4
- 0
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml Ver fichero

@@ -184,6 +184,10 @@
and m.`create_from_id` = #{createFromId}
</if>
<if test=" null != searchKey and '' != searchKey ">
and (m.`name` like concat('%', #{searchKey},'%') or m.`link_phone` like concat('%', #{searchKey},'%'))
</if>
<if test=" null != adminTypes and adminTypes.size > 0">
and m.`is_admin` in
<foreach collection="adminTypes" index="index" item="typeItem" open="(" separator="," close=")">


Cargando…
Cancelar
Guardar