|
|
|
@@ -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){ |
|
|
|
|