Browse Source

修复发卡记录排序问题

udream-cxs 4 years ago
parent
commit
e25253b220

+ 1 - 2
lift-ud-service/src/main/java/cn/com/ty/lift/ud/neety/support/SensitivewordFilter.java

@@ -15,8 +15,7 @@ import cn.com.ty.lift.ud.sensitivewords.service.impl.SensitiveWordsServiceImpl;
  */
 public class SensitivewordFilter {
 
-    private static ISensitiveWordsService liftCaseService =
-        ApplicationContextUtil.getBean(SensitiveWordsServiceImpl.class);
+    private static ISensitiveWordsService liftCaseService = ApplicationContextUtil.getBean(SensitiveWordsServiceImpl.class);
 
     /**
      * 替换敏感字字符

+ 1 - 1
lift-ud-service/src/main/java/cn/com/ty/lift/ud/sensitivewords/controller/SensitiveWordsController.java

@@ -80,7 +80,7 @@ public class SensitiveWordsController extends BaseController<SensitiveWords, Sen
     @ApiOperation(value = "修改")
     public RestResponse update(@RequestBody SensitiveWords request) {
         List<SensitiveWords> byKeyword = sensitiveWordsService.getByKeyword(request.getKeyword());
-        if(!byKeyword.isEmpty()) {
+        if(!byKeyword.isEmpty() && !byKeyword.get(0).getId().equals(request.getId())) {
             return RestResponse.fail("敏感词汇重复:"+request.getKeyword());
         }
         boolean updateFlag = getService().updateById(request);

+ 1 - 1
lift-ud-service/src/main/java/cn/com/ty/lift/ud/userAgreement/controller/UserAgreementController.java

@@ -63,7 +63,7 @@ public class UserAgreementController extends BaseController<UserAgreement, UserA
         return userAgreementService.selectByExample(request);
     }
     
-  //根据条件查询
+    //根据条件查询
     @GetMapping("/queryListCharge")
     @ApiOperation(value = "专家协议列表")
     public RestResponse queryListCharge() {

+ 2 - 2
lift-ud-service/src/main/java/cn/com/ty/lift/ud/userAgreement/service/impl/UserAgreementServiceImpl.java

@@ -65,8 +65,8 @@ public class UserAgreementServiceImpl extends ServiceImpl<UserAgreementMapper, U
     @Override
 	public RestResponse getAgreementByUser(Long userId) {
 		List<UserAgreement> resultList = new ArrayList<>();
-		UserAccount byId = iUserAccountService.getById(userId);
-		if(byId.getExpertFlag() == 1) {
+		UserAccount userAccount = iUserAccountService.getById(userId);
+		if(userAccount.getExpertFlag() == 1) {
 			resultList = userAgreementMapper.selectList(new QueryWrapper<UserAgreement>().eq("statuz", 1));
 		}else {
 			resultList = userAgreementMapper.selectList(new QueryWrapper<UserAgreement>().eq("statuz", 1).eq("type", 1));

+ 1 - 0
lift-ud-service/src/main/java/cn/com/ty/lift/ud/userCoupon/mapper/UserCouponMapper.xml

@@ -39,6 +39,7 @@
                 and uc.used_flag = #{usedFlag}
             </if>
         </where>
+        order by uc.${sort.orderBy} ${sort.order}
         limit #{pageIndex},#{pageSize}
     </select>