傅行帆 5 jaren geleden
bovenliggende
commit
f0670a3ef5

+ 8
- 6
src/main/java/com/huiju/estateagents/controller/TaGoodsController.java Bestand weergeven

58
                                     @RequestParam(value = "buildingId",required = false) String buildingId,
58
                                     @RequestParam(value = "buildingId",required = false) String buildingId,
59
                                     @RequestParam(value ="priceLesser",required = false) Integer priceLesser,
59
                                     @RequestParam(value ="priceLesser",required = false) Integer priceLesser,
60
                                     @RequestParam(value ="priceGreater",required = false) Integer priceGreater,
60
                                     @RequestParam(value ="priceGreater",required = false) Integer priceGreater,
61
-                                    @RequestParam(value ="status",required = false) Integer status){
61
+                                    @RequestParam(value ="status",required = false) Integer status,HttpServletRequest request){
62
         ResponseBean responseBean = new ResponseBean();
62
         ResponseBean responseBean = new ResponseBean();
63
         try {
63
         try {
64
             //使用分页插件
64
             //使用分页插件
68
             queryWrapper.lt(null!=priceGreater,"point_price",priceGreater);
68
             queryWrapper.lt(null!=priceGreater,"point_price",priceGreater);
69
             queryWrapper.gt(null != priceLesser,"point_price",priceLesser);
69
             queryWrapper.gt(null != priceLesser,"point_price",priceLesser);
70
             queryWrapper.eq(null != status,"status",status);
70
             queryWrapper.eq(null != status,"status",status);
71
+            queryWrapper.eq("org_id",getOrgId(request));
71
             queryWrapper.eq(!StringUtils.isEmpty(buildingId),"building_id",buildingId);
72
             queryWrapper.eq(!StringUtils.isEmpty(buildingId),"building_id",buildingId);
72
             queryWrapper.orderByDesc("create_date");
73
             queryWrapper.orderByDesc("create_date");
73
 
74
 
87
      * @return
88
      * @return
88
      */
89
      */
89
     @RequestMapping(value="/admin/taGoods/add",method= RequestMethod.POST)
90
     @RequestMapping(value="/admin/taGoods/add",method= RequestMethod.POST)
90
-    public ResponseBean taGoodsAdd(@RequestBody TaGoods taGoods){
91
+    public ResponseBean taGoodsAdd(@RequestBody TaGoods taGoods,HttpServletRequest request){
91
         ResponseBean responseBean = new ResponseBean();
92
         ResponseBean responseBean = new ResponseBean();
92
         try {
93
         try {
93
 
94
 
94
             Integer cityId = iTaBuildingService.getCityById(taGoods.getBuildingId());
95
             Integer cityId = iTaBuildingService.getCityById(taGoods.getBuildingId());
95
             taGoods.setCityId(cityId);
96
             taGoods.setCityId(cityId);
96
-
97
+            taGoods.setOrgId(getOrgId(request));
97
             if (iTaGoodsService.save(taGoods)){
98
             if (iTaGoodsService.save(taGoods)){
98
                 responseBean.addSuccess(taGoods);
99
                 responseBean.addSuccess(taGoods);
99
             }else {
100
             }else {
135
      * @return
136
      * @return
136
      */
137
      */
137
     @RequestMapping(value="/admin/taGoods",method= RequestMethod.PUT)
138
     @RequestMapping(value="/admin/taGoods",method= RequestMethod.PUT)
138
-    public ResponseBean taGoodsUpdate(@RequestBody TaGoods taGoods){
139
+    public ResponseBean taGoodsUpdate(@RequestBody TaGoods taGoods,HttpServletRequest request){
139
         ResponseBean responseBean = new ResponseBean();
140
         ResponseBean responseBean = new ResponseBean();
140
         try {
141
         try {
141
 
142
 
142
             Integer cityId = iTaBuildingService.getCityById(taGoods.getBuildingId());
143
             Integer cityId = iTaBuildingService.getCityById(taGoods.getBuildingId());
143
             taGoods.setCityId(cityId);
144
             taGoods.setCityId(cityId);
144
-
145
+            taGoods.setOrgId(getOrgId(request));
145
             if (iTaGoodsService.updateById(taGoods)){
146
             if (iTaGoodsService.updateById(taGoods)){
146
                 responseBean.addSuccess(taGoods);
147
                 responseBean.addSuccess(taGoods);
147
             }else {
148
             }else {
161
      * @return
162
      * @return
162
      */
163
      */
163
     @RequestMapping(value="/admin/taGoods/change",method= RequestMethod.PUT)
164
     @RequestMapping(value="/admin/taGoods/change",method= RequestMethod.PUT)
164
-    public ResponseBean taGoodsChange(@RequestBody TaGoods taGoods){
165
+    public ResponseBean taGoodsChange(@RequestBody TaGoods taGoods,HttpServletRequest request){
165
         ResponseBean responseBean = new ResponseBean();
166
         ResponseBean responseBean = new ResponseBean();
166
         try {
167
         try {
167
             if(null != taGoods.getStatus() && taGoods.getStatus().equals(CommConstant.STATUS_NORMAL)){
168
             if(null != taGoods.getStatus() && taGoods.getStatus().equals(CommConstant.STATUS_NORMAL)){
169
             }else {
170
             }else {
170
                 taGoods.setStatus(CommConstant.STATUS_NORMAL);
171
                 taGoods.setStatus(CommConstant.STATUS_NORMAL);
171
             }
172
             }
173
+            taGoods.setOrgId(getOrgId(request));
172
             if (iTaGoodsService.updateById(taGoods)){
174
             if (iTaGoodsService.updateById(taGoods)){
173
                 responseBean.addSuccess(taGoods);
175
                 responseBean.addSuccess(taGoods);
174
             }else {
176
             }else {

+ 3
- 1
src/main/java/com/huiju/estateagents/controller/TaPointsExchangeController.java Bestand weergeven

19
 import org.springframework.web.bind.annotation.ResponseBody;
19
 import org.springframework.web.bind.annotation.ResponseBody;
20
 import org.springframework.web.bind.annotation.RestController;
20
 import org.springframework.web.bind.annotation.RestController;
21
 
21
 
22
+import javax.servlet.http.HttpServletRequest;
22
 import java.time.LocalDateTime;
23
 import java.time.LocalDateTime;
23
 
24
 
24
 /**
25
 /**
57
                                              @RequestParam(value ="startVerifyDate",required = false) String startVerifyDate,
58
                                              @RequestParam(value ="startVerifyDate",required = false) String startVerifyDate,
58
                                              @RequestParam(value ="endVerifyDate",required = false) String endVerifyDate,
59
                                              @RequestParam(value ="endVerifyDate",required = false) String endVerifyDate,
59
                                              @RequestParam(value ="status",required = false) Integer status,
60
                                              @RequestParam(value ="status",required = false) Integer status,
60
-                                             @RequestParam(value ="tel",required = false) String tel){
61
+                                             @RequestParam(value ="tel",required = false) String tel, HttpServletRequest request){
61
         ResponseBean responseBean = new ResponseBean();
62
         ResponseBean responseBean = new ResponseBean();
62
         try {
63
         try {
63
             //使用分页插件
64
             //使用分页插件
72
             taPointsExchange.setEndVerifyDate(endVerifyDate);
73
             taPointsExchange.setEndVerifyDate(endVerifyDate);
73
             taPointsExchange.setStatus(status);
74
             taPointsExchange.setStatus(status);
74
             taPointsExchange.setTel(tel);
75
             taPointsExchange.setTel(tel);
76
+            taPointsExchange.setOrgId(getOrgId(request));
75
             
77
             
76
             responseBean = iTaPointsExchangeService.selectList(pageNum,pageSize,taPointsExchange);
78
             responseBean = iTaPointsExchangeService.selectList(pageNum,pageSize,taPointsExchange);
77
 
79
 

+ 3
- 0
src/main/resources/mapper/TaPointsExchangeMapper.xml Bestand weergeven

28
         <if test="taPointsExchange.status != null and taPointsExchange.status != '' or taPointsExchange.status ==0">
28
         <if test="taPointsExchange.status != null and taPointsExchange.status != '' or taPointsExchange.status ==0">
29
             and  t.`status` = #{taPointsExchange.status}
29
             and  t.`status` = #{taPointsExchange.status}
30
         </if>
30
         </if>
31
+        <if test="taPointsExchange.orgId != null and taPointsExchange.orgId != ''">
32
+            and  t.org_id = #{taPointsExchange.orgId}
33
+        </if>
31
         <if test="taPointsExchange.personName != null and taPointsExchange.personName != ''">
34
         <if test="taPointsExchange.personName != null and taPointsExchange.personName != ''">
32
             and  t.person_name like concat('%',#{taPointsExchange.personName},'%')
35
             and  t.person_name like concat('%',#{taPointsExchange.personName},'%')
33
         </if>
36
         </if>