| @@ -30,6 +30,7 @@ public class WxMsgCallbackController extends BaseController | |||||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | ||||
| public ResultData list(@ModelAttribute WxMsgCallback wxMsgCallback,Integer pageNum, Integer pageSize) { | public ResultData list(@ModelAttribute WxMsgCallback wxMsgCallback,Integer pageNum, Integer pageSize) { | ||||
| if (null == wxMsgCallback) wxMsgCallback = new WxMsgCallback(); | if (null == wxMsgCallback) wxMsgCallback = new WxMsgCallback(); | ||||
| wxMsgCallback.setTenantId(getTenantId()); | |||||
| final PageInfo<WxMsgCallback> page = wxMsgCallbackService.listAsPage(wxMsgCallback, pageNum, pageSize); | final PageInfo<WxMsgCallback> page = wxMsgCallbackService.listAsPage(wxMsgCallback, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -39,6 +40,7 @@ public class WxMsgCallbackController extends BaseController | |||||
| public ResultData add(@RequestBody WxMsgCallback wxMsgCallback) { | public ResultData add(@RequestBody WxMsgCallback wxMsgCallback) { | ||||
| //Assert.notNull(wxMsgCallback.getName(), "角色名不能为空"); | //Assert.notNull(wxMsgCallback.getName(), "角色名不能为空"); | ||||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | ||||
| wxMsgCallback.setTenantId(getTenantId()); | |||||
| wxMsgCallbackService.saveOrUpdate(wxMsgCallback); | wxMsgCallbackService.saveOrUpdate(wxMsgCallback); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -35,6 +35,7 @@ public class WxMsgController extends BaseController | |||||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | ||||
| public ResultData list(@ModelAttribute WxMsg wxMsg,Integer pageNum, Integer pageSize) { | public ResultData list(@ModelAttribute WxMsg wxMsg,Integer pageNum, Integer pageSize) { | ||||
| if (null == wxMsg) wxMsg = new WxMsg(); | if (null == wxMsg) wxMsg = new WxMsg(); | ||||
| wxMsg.setTenantId(getTenantId()); | |||||
| final PageInfo<WxMsg> page = wxMsgService.listAsPage(wxMsg, pageNum, pageSize); | final PageInfo<WxMsg> page = wxMsgService.listAsPage(wxMsg, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -28,6 +28,7 @@ public class WxMsgSignatureController extends BaseController | |||||
| @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) | ||||
| public ResultData list(@ModelAttribute WxMsgSignature wxMsgSignature,Integer pageNum, Integer pageSize) { | public ResultData list(@ModelAttribute WxMsgSignature wxMsgSignature,Integer pageNum, Integer pageSize) { | ||||
| if (null == wxMsgSignature) wxMsgSignature = new WxMsgSignature(); | if (null == wxMsgSignature) wxMsgSignature = new WxMsgSignature(); | ||||
| wxMsgSignature.setTenantId(getTenantId()); | |||||
| final PageInfo<WxMsgSignature> page = wxMsgSignatureService.listAsPage(wxMsgSignature, pageNum, pageSize); | final PageInfo<WxMsgSignature> page = wxMsgSignatureService.listAsPage(wxMsgSignature, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -37,6 +38,7 @@ public class WxMsgSignatureController extends BaseController | |||||
| public ResultData add(@RequestBody WxMsgSignature wxMsgSignature) { | public ResultData add(@RequestBody WxMsgSignature wxMsgSignature) { | ||||
| //Assert.notNull(wxMsgSignature.getName(), "角色名不能为空"); | //Assert.notNull(wxMsgSignature.getName(), "角色名不能为空"); | ||||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | ||||
| wxMsgSignature.setTenantId(getTenantId()); | |||||
| wxMsgSignatureService.saveOrUpdate(wxMsgSignature); | wxMsgSignatureService.saveOrUpdate(wxMsgSignature); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -66,7 +68,7 @@ public class WxMsgSignatureController extends BaseController | |||||
| @ApiOperation("获取所有数据") | @ApiOperation("获取所有数据") | ||||
| @GetMapping("getsignaturelist") | @GetMapping("getsignaturelist") | ||||
| public ResultData getmodellist() { | public ResultData getmodellist() { | ||||
| return wxMsgSignatureService.getsignaturelist(); | |||||
| return wxMsgSignatureService.getsignaturelist(getTenantId()); | |||||
| } | } | ||||
| @@ -1,6 +1,5 @@ | |||||
| package com.simple.service; | package com.simple.service; | ||||
| import java.util.*; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.simple.common.ResultData; | import com.simple.common.ResultData; | ||||
| import com.simple.domain.po.WxMsgSignature; | import com.simple.domain.po.WxMsgSignature; | ||||
| @@ -40,6 +39,6 @@ public interface WxMsgSignatureService { | |||||
| void deleteById(Long id); | void deleteById(Long id); | ||||
| ResultData getsignaturelist(); | |||||
| ResultData getsignaturelist(String tenantId); | |||||
| } | } | ||||
| @@ -4,7 +4,6 @@ import java.util.*; | |||||
| import com.github.pagehelper.PageHelper; | import com.github.pagehelper.PageHelper; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.simple.common.ResultData; | import com.simple.common.ResultData; | ||||
| import com.simple.domain.po.WxMsgModel; | |||||
| import com.simple.domain.po.WxMsgSignature; | import com.simple.domain.po.WxMsgSignature; | ||||
| import com.simple.mapper.WxMsgSignatureMapper; | import com.simple.mapper.WxMsgSignatureMapper; | ||||
| import com.simple.service.WxMsgSignatureService; | import com.simple.service.WxMsgSignatureService; | ||||
| @@ -35,7 +34,6 @@ public class WxMsgSignatureServiceImpl implements WxMsgSignatureService { | |||||
| //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| record.setId(idWorker.nextId()); | record.setId(idWorker.nextId()); | ||||
| record.setTenantId("1"); | |||||
| record.setCreatetime(new Date()); | record.setCreatetime(new Date()); | ||||
| wxMsgSignatureMapper.insertSelective(record); | wxMsgSignatureMapper.insertSelective(record); | ||||
| } else { | } else { | ||||
| @@ -49,9 +47,9 @@ public class WxMsgSignatureServiceImpl implements WxMsgSignatureService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData getsignaturelist() { | |||||
| public ResultData getsignaturelist(String tenantId) { | |||||
| WxMsgSignature wxMsgSignature = new WxMsgSignature(); | WxMsgSignature wxMsgSignature = new WxMsgSignature(); | ||||
| wxMsgSignature.setTenantId("1"); | |||||
| wxMsgSignature.setTenantId(tenantId); | |||||
| List<WxMsgSignature> list = wxMsgSignatureMapper.findList(wxMsgSignature); | List<WxMsgSignature> list = wxMsgSignatureMapper.findList(wxMsgSignature); | ||||
| return new ResultData(list); | return new ResultData(list); | ||||
| } | } | ||||
| @@ -27,7 +27,7 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | <if test=" null != tenantId "> | ||||
| and `tenant_id` like concat('%', #{tenantId},'%') | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | </if> | ||||
| @@ -35,7 +35,7 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | <if test=" null != tenantId "> | ||||
| and `tenant_id` like concat('%', #{tenantId},'%') | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | </if> | ||||
| @@ -36,7 +36,7 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | <if test=" null != tenantId "> | ||||
| and `tenant_id` like concat('%', #{tenantId},'%') | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | </if> | ||||
| @@ -21,7 +21,7 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | <if test=" null != tenantId "> | ||||
| and `tenant_id` like concat('%', #{tenantId},'%') | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | </if> | ||||