Bläddra i källkod

1.排序修改

yuanliang 1 år sedan
förälder
incheckning
23842aa8ee

+ 7 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TenantActivationCodeServiceImpl.java

@@ -346,7 +346,13 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
                 .eq(TenantActivationCode::getSendStatus, EActivationCode.SEND)
                 .eq(TenantActivationCode::getSendStatus, EActivationCode.SEND)
                 .update();
                 .update();
         if (!update) {
         if (!update) {
-            throw new BizException("激活码已经激活");
+            TenantActivationCode code = this.getById(activationCode.getId());
+            if (EActivationCode.WAIT.equals(code.getSendStatus())) {
+                throw new BizException("激活码已撤回");
+            }
+            if (Boolean.TRUE.equals(code.getActivationStatus())) {
+                throw new BizException("激活码已经激活");
+            }
         }
         }
         com.yonge.cooleshow.auth.api.entity.SysUser sysUser = sysUserService.findUserByPhone(activationCode.getActivationPhone());
         com.yonge.cooleshow.auth.api.entity.SysUser sysUser = sysUserService.findUserByPhone(activationCode.getActivationPhone());
         if (sysUser != null) {
         if (sysUser != null) {

+ 0 - 3
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/TenantAlbumPurchaseWrapper.java

@@ -41,9 +41,6 @@ public class TenantAlbumPurchaseWrapper {
         @ApiModelProperty("机构ID")
         @ApiModelProperty("机构ID")
         private Long tenantId;
         private Long tenantId;
 
 
-        @ApiModelProperty(value = "排序规则,激活数排序:升序:active_quantity_ asc,逆序:active_quantity_ desc")
-        private String orderBy;
-
 
 
         @ApiModelProperty("采购状态 WAIT_PAY 待支付   PAID 已付款 CLOSE 已关闭")
         @ApiModelProperty("采购状态 WAIT_PAY 待支付   PAID 已付款 CLOSE 已关闭")
         private String purchaseStatus;
         private String purchaseStatus;

+ 1 - 8
cooleshow-user/user-biz/src/main/resources/config/mybatis/TenantAlbumPurchaseMapper.xml

@@ -58,14 +58,7 @@
                 AND #{param.purchaseEndTime} >= t.create_time_
                 AND #{param.purchaseEndTime} >= t.create_time_
             </if>
             </if>
         </where>
         </where>
-        <choose>
-            <when test="param.orderBy != null and param.orderBy.trim() != ''">
-                order by ${param.orderBy}
-            </when>
-            <otherwise>
-                order by t.id_ desc
-            </otherwise>
-        </choose>
+        order by t.create_time_ desc
     </select>
     </select>
     
     
 </mapper>
 </mapper>