Jelajahi Sumber

Merge branch 'pre'

he2802 3 tahun lalu
induk
melakukan
2c4f6ddf31
24 mengubah file dengan 202 tambahan dan 10 penghapusan
  1. 1 2
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/bank/QuestionController.java
  2. 10 1
      zhongzheng-api/src/main/java/com/zhongzheng/controller/inform/InformUserController.java
  3. 1 0
      zhongzheng-api/src/main/resources/application.yml
  4. 4 0
      zhongzheng-common/pom.xml
  5. 71 0
      zhongzheng-common/src/main/java/com/zhongzheng/common/utils/AES.java
  6. 14 0
      zhongzheng-common/src/main/resources/config/pri.key
  7. 16 0
      zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/SysLoginService.java
  8. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/QuestionAddBo.java
  9. 3 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/QuestionEditBo.java
  10. 3 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/QuestionQueryBo.java
  11. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/domain/Question.java
  12. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionServiceImpl.java
  13. 4 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/vo/QuestionVo.java
  14. 4 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/inform/bo/InformUserQueryBo.java
  15. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/inform/domain/InformUser.java
  16. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/inform/service/IInformUserService.java
  17. 23 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/inform/service/impl/InformUserServiceImpl.java
  18. 16 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserSubscribeServiceImpl.java
  19. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/vo/SectionStudyRecordVo.java
  20. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/wx/service/impl/WxPayServiceImpl.java
  21. 4 0
      zhongzheng-system/src/main/resources/mapper/modules/activity/ActivityRecommendMapper.xml
  22. 3 1
      zhongzheng-system/src/main/resources/mapper/modules/bank/QuestionMapper.xml
  23. 1 0
      zhongzheng-system/src/main/resources/mapper/modules/inform/InformUserMapper.xml
  24. 8 2
      zhongzheng-system/src/main/resources/mapper/modules/user/UserStudyRecordMapper.xml

+ 1 - 2
zhongzheng-admin/src/main/java/com/zhongzheng/controller/bank/QuestionController.java

@@ -185,8 +185,7 @@ public class QuestionController extends BaseController {
         return AjaxResult.success(errorLog);
     }
 
-    @Log(title = "" +
-            "", businessType = BusinessType.IMPORT)
+    @Log(title = "" +"", businessType = BusinessType.IMPORT)
     @ApiOperation("导入题目Word模板列表")
     @PreAuthorize("@ss.hasPermi('system:question:import')")
     @PostMapping("/importWordQuestionList")

+ 10 - 1
zhongzheng-api/src/main/java/com/zhongzheng/controller/inform/InformUserController.java

@@ -56,6 +56,7 @@ public class InformUserController extends BaseController {
         startPage();
         ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
         bo.setUserId(loginUser.getUser().getUserId());
+        bo.setStatus(1);
         List<InformUserVo> list = iInformUserService.queryList(bo);
         return getDataTable(list);
     }
@@ -68,7 +69,6 @@ public class InformUserController extends BaseController {
     @GetMapping("/{id}")
     public AjaxResult<InformUserVo> getInfo(@PathVariable("id" ) Long id) {
         ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
-
         return AjaxResult.success(iInformUserService.queryByIdUser(id,loginUser.getUser().getUserId()));
     }
 
@@ -94,5 +94,14 @@ public class InformUserController extends BaseController {
         return toAjax(iInformUserService.updateAllRead(bo) ? 1 : 0);
     }
 
+    @ApiOperation("清空系统消息")
+    @Log(title = "清空系统消息", businessType = BusinessType.UPDATE)
+    @PostMapping("/removeAll")
+    public AjaxResult<Void> removeAll() {
+        InformUserEditBo bo = new InformUserEditBo();
+        ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
+        bo.setUserId(loginUser.getUser().getUserId());
+        return toAjax(iInformUserService.removeAll(bo) ? 1 : 0);
+    }
 
 }

+ 1 - 0
zhongzheng-api/src/main/resources/application.yml

@@ -248,6 +248,7 @@ tencent:
     SecretId: AKIDd6XkjTw9D1atwkJceS2NSIuHPK1ThfOr
     SecretKey: GG2ZqrdCWcS6Yx72h6F7k7E4ey2qPnwq
 
+
 aliyun:
   sms:
     signName: 祥粤学校

+ 4 - 0
zhongzheng-common/pom.xml

@@ -200,6 +200,10 @@
             <groupId>com.github.xiaoymin</groupId>
             <artifactId>knife4j-spring-boot-starter</artifactId>
         </dependency>
+        <dependency>
+            <groupId>io.undertow</groupId>
+            <artifactId>undertow-core</artifactId>
+        </dependency>
 
     </dependencies>
 

+ 71 - 0
zhongzheng-common/src/main/java/com/zhongzheng/common/utils/AES.java

@@ -1,5 +1,6 @@
 package com.zhongzheng.common.utils;
 
+import org.apache.commons.codec.binary.Base64;
 import org.bouncycastle.jce.provider.BouncyCastleProvider;
 import javax.crypto.BadPaddingException;
 import javax.crypto.Cipher;
@@ -7,7 +8,13 @@ import javax.crypto.IllegalBlockSizeException;
 import javax.crypto.NoSuchPaddingException;
 import javax.crypto.spec.IvParameterSpec;
 import javax.crypto.spec.SecretKeySpec;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
 import java.security.*;
+import java.security.interfaces.RSAPrivateKey;
+import java.security.interfaces.RSAPublicKey;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.X509EncodedKeySpec;
 
 
 public class AES {
@@ -84,4 +91,68 @@ public class AES {
         }
         return "";
     }
+
+    /**
+     * RSA公钥加密
+     *
+     * @param str
+     *            加密字符串
+     * @param publicKey
+     *            公钥
+     * @return 密文
+     * @throws Exception
+     *             加密过程中的异常信息
+     */
+    public static String encrypt( String str, String publicKey ) throws Exception{
+        //base64编码的公钥
+        byte[] decoded = Base64.decodeBase64(publicKey);
+        RSAPublicKey pubKey = (RSAPublicKey) KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(decoded));
+        //RSA加密
+        Cipher cipher = Cipher.getInstance("RSA");
+        cipher.init(Cipher.ENCRYPT_MODE, pubKey);
+        String outStr = Base64.encodeBase64String(cipher.doFinal(str.getBytes("UTF-8")));
+        return outStr;
+    }
+
+    /**
+     * RSA私钥解密
+     *
+     * @param str
+     *            加密字符串
+     * @param privateKey
+     *            私钥
+     * @return 铭文
+     * @throws Exception
+     *             解密过程中的异常信息
+     */
+    public static String decrypt(String str, String privateKey) throws Exception{
+        //64位解码加密后的字符串
+        byte[] inputByte = Base64.decodeBase64(str.getBytes("UTF-8"));
+        //base64编码的私钥
+        byte[] decoded = Base64.decodeBase64(privateKey);
+        RSAPrivateKey priKey = (RSAPrivateKey) KeyFactory.getInstance("RSA").generatePrivate(new PKCS8EncodedKeySpec(decoded));
+        //RSA解密
+        Cipher cipher = Cipher.getInstance("RSA");
+        cipher.init(Cipher.DECRYPT_MODE, priKey);
+        String outStr = new String(cipher.doFinal(inputByte));
+        return outStr;
+    }
+
+    public static String getStringByInputStream_1(InputStream inputStream){
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        try {
+            byte[] b = new byte[10240];
+            int n;
+            while ((n = inputStream.read(b)) != -1) {
+                outputStream.write(b, 0, n);
+            }
+        } catch (Exception e) {
+            try {
+                inputStream.close();
+                outputStream.close();
+            } catch (Exception e1) {
+            }
+        }
+        return outputStream.toString();
+    }
 }

+ 14 - 0
zhongzheng-common/src/main/resources/config/pri.key

@@ -0,0 +1,14 @@
+MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBALiqRvAgoSuy0rWw
+URI8SE5KGlGmPj6w5WkkfGXmv/bEsF8D8ytdwAStrlGj1xc1BKqYsu3zB5yguT+C
+V9rkh2FdXSFFVCmUhWznPczFxRr2m0o8dROCHzEwIG+XyxQkrCSafi9hZ4N8dPbY
+QvsevWlMzBSEXpaI2VZ9BNWgXWuHAgMBAAECgYAxNW7h3lAUjPqJYAq6iUXbVvPc
+fihoHEuF0Ss1HGBbKd618x+BluHsXTvulXJjxMURkM9diT2mB05WFi3DLtLEM243
+w9tDsYq+0nwrRx9NNcxXlMtwlFC1EeAHPn4aKz1gfsT9ISBJvlDr8KK86hyvXnYG
+bzhcNRrb9e8LOZHjAQJBAN2y1uqHD7eeMYPYUCpXGNhvCTd9Z6n9GRfClohuB7sZ
+64zEDD4KSK+9DGRmwq+ETEeLrGdXBcb6oiUat6OZ+/ECQQDVPJipF875bDXqzJmG
+SIkjT1snZoecio+sK0nHKgbDhhbeCQCwPjp35K4JKgGZLqeWWkBmOTzUS4PmPGxu
+jrb3AkEAhrFmI50lLnDdMnZU1jSOcsibN+xn8/5CpY3iuUboSYOI+cAOlA7ZdHQO
+OF26gLqHQZyZhTt41hhmNNbTpYEjcQJBAJROYerxOS22ukVE6d5AYskhL0fXAqi4
+ojZfoR+ZNj0U7KCe6FCr5yRt8zFCevwcO8jRmoq+cnVA1Er0aYH3Vn8CQHU/jOtg
+wAtnR3lOcM4428X39l6rJPAuR1CzubMNGMS5grHDhrOVy0gYbZPWU4QUgC82wPq0
+yrzs/ckG/wLyzpw=

+ 16 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/SysLoginService.java

@@ -2,8 +2,12 @@ package com.zhongzheng.framework.web.service;
 
 import javax.annotation.Resource;
 
+import com.zhongzheng.common.utils.AES;
 import com.zhongzheng.framework.manager.factory.AsyncFactory;
+import org.apache.commons.compress.utils.IOUtils;
+import org.bouncycastle.jcajce.provider.asymmetric.rsa.RSAUtil;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.authentication.AuthenticationManager;
 import org.springframework.security.authentication.BadCredentialsException;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
@@ -19,6 +23,8 @@ import com.zhongzheng.common.exception.user.UserPasswordNotMatchException;
 import com.zhongzheng.common.utils.MessageUtils;
 import com.zhongzheng.framework.manager.AsyncManager;
 
+import java.io.InputStream;
+
 /**
  * 登录校验方法
  *
@@ -64,7 +70,17 @@ public class SysLoginService
         Authentication authentication = null;
         try
         {
+            String rsaPrivate = null;
+           try {
+                InputStream certStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("config/pri.key");
+                rsaPrivate = AES.getStringByInputStream_1(certStream);
+                certStream.close();
+            } catch (Exception e) {
+                e.printStackTrace();
+
+            }
             // 该方法会去调用UserDetailsServiceImpl.loadUserByUsername
+            password = AES.decrypt(password,rsaPrivate);
             authentication = authenticationManager
                     .authenticate(new UsernamePasswordAuthenticationToken(username, password));
         }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/QuestionAddBo.java

@@ -70,4 +70,7 @@ public class QuestionAddBo {
     /** 导入编号 */
     @ApiModelProperty("导入编号")
     private String importNo;
+    /** 导入顺序 */
+    @ApiModelProperty("导入顺序")
+    private Integer importSort;
 }

+ 3 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/QuestionEditBo.java

@@ -77,5 +77,7 @@ public class QuestionEditBo {
     /** 业务层级列表 */
     @ApiModelProperty("业务层级列表")
     private List<QuestionBusinessEditBo> businessList;
-
+    /** 导入顺序 */
+    @ApiModelProperty("导入顺序")
+    private Integer importSort;
 }

+ 3 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/QuestionQueryBo.java

@@ -88,5 +88,7 @@ public class QuestionQueryBo extends BaseEntity {
 	/** 编码 */
 	@ApiModelProperty("编码")
 	private String code;
-
+	/** 导入顺序 */
+	@ApiModelProperty("导入顺序")
+	private Integer importSort;
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/domain/Question.java

@@ -59,4 +59,6 @@ private static final long serialVersionUID=1L;
     private String createBy;
     /** 导入编号 */
     private String importNo;
+    /** 导入顺序 */
+    private Integer importSort;
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionServiceImpl.java

@@ -355,6 +355,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
         String errorLog = ""; //错误提示
         String buffer = "";
         String importNo = ServletUtils.getEncoded("IMPORT");
+        int sort = 1;
         try{
             String path = file.getOriginalFilename();
             if (path.endsWith(".doc")) {
@@ -659,7 +660,9 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                        bo.setImportNo(importNo);
                        bo.setPublishStatus(1);
                        bo.setBusinessList(businessList);
+                       bo.setImportSort(sort);
                        insertByAddBoImport(bo,i);
+                       sort++;
 
                         //清空数据
                         isOption = false;

+ 4 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/vo/QuestionVo.java

@@ -107,5 +107,8 @@ public class QuestionVo {
 	@ApiModelProperty("修改时间")
 	@Excel(name = "修改时间")
 	private Long updateTime;
-
+	/** 导入顺序 */
+	@Excel(name = "导入顺序")
+	@ApiModelProperty("导入顺序")
+	private Integer importSort;
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/inform/bo/InformUserQueryBo.java

@@ -126,4 +126,8 @@ public class InformUserQueryBo extends BaseEntity {
      */
     @ApiModelProperty("订单商品ID")
     private Long orderGoodsId;
+
+    /** 状态 1有效 0无效 */
+    @ApiModelProperty("状态 1有效 0无效")
+    private Integer status;
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/inform/domain/InformUser.java

@@ -97,4 +97,7 @@ public class InformUser implements Serializable {
      * 订单商品ID
      */
     private Long orderGoodsId;
+
+    /** 状态 1有效 0无效 */
+    private Integer status;
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/inform/service/IInformUserService.java

@@ -58,4 +58,6 @@ public interface IInformUserService extends IService<InformUser> {
 	InformUserVo queryByIdUser(Long id, Long userId);
 
 	Boolean updateAllRead(InformUserEditBo bo);
+
+	Boolean removeAll(InformUserEditBo bo);
 }

+ 23 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/inform/service/impl/InformUserServiceImpl.java

@@ -4,7 +4,10 @@ import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.modules.course.domain.CourseBusiness;
+import com.zhongzheng.modules.course.domain.CoursePhotoLog;
 import com.zhongzheng.modules.exam.vo.ExamUserApplyVo;
 import com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo;
 import com.zhongzheng.modules.grade.domain.ClassGradeUser;
@@ -85,6 +88,7 @@ public class InformUserServiceImpl extends ServiceImpl<InformUserMapper, InformU
         lqw.eq(bo.getSendTime() != null, InformUser::getSendTime, bo.getSendTime());
         lqw.eq(bo.getSendStatus() != null, InformUser::getSendStatus, bo.getSendStatus());
         lqw.eq(bo.getReceiptStatus() != null, InformUser::getReceiptStatus, bo.getReceiptStatus());
+        lqw.eq(bo.getStatus() != null, InformUser::getStatus, bo.getStatus());
         lqw.eq( InformUser::getSendStatus, 1);
         lqw.in( bo.getSystemStatusList() != null,InformUser::getSystemStatus, bo.getSystemStatusList());
         lqw.orderByDesc(InformUser::getSendTime);
@@ -235,4 +239,23 @@ public class InformUserServiceImpl extends ServiceImpl<InformUserMapper, InformU
         }
         return true;
     }
+
+    /**
+     * 清除用户系统通知
+     * @param bo
+     * @return
+     */
+    @Override
+    public Boolean removeAll(InformUserEditBo bo) {
+        if(Validator.isEmpty(bo.getUserId())){
+            throw new CustomException("参数错误");
+        }
+        LambdaUpdateWrapper<InformUser> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
+        objectLambdaUpdateWrapper.eq(InformUser::getUserId, bo.getUserId());
+        objectLambdaUpdateWrapper.eq(InformUser::getSendStatus, 1);
+        objectLambdaUpdateWrapper.set(InformUser::getStatus, 0);
+        objectLambdaUpdateWrapper.set(InformUser::getUpdateTime,DateUtils.getNowTime());
+        this.update(null, objectLambdaUpdateWrapper);
+        return true;
+    }
 }

+ 16 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserSubscribeServiceImpl.java

@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.zhongzheng.common.core.redis.RedisCache;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
@@ -52,6 +53,7 @@ import org.thymeleaf.util.StringUtils;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
 /**
@@ -81,6 +83,8 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
     @Autowired
     private CourseMapper courseMapper;
 
+    @Autowired
+    private RedisCache redisCache;
 
     @Autowired
     private IUserService iUserService;
@@ -97,6 +101,8 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
     @Value("${aliyun.sms.newExamFail}")
     private String newExamFail;
 
+
+
     @Autowired
     private com.zhongzheng.modules.alisms.service.IAliSmsService IAliSmsService;
 
@@ -178,6 +184,12 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
 
 
     public String insertByAddBoImport(UserSubscribeAddBo bo) throws ParseException {
+        String redsKey = "Subscribe_"+bo.getUserId();
+        String token = redisCache.getCacheObject(redsKey);
+        if(token!=null){
+            throw new CustomException("请勿频繁操作");
+        }
+        redisCache.setCacheObject(redsKey, redsKey, 3, TimeUnit.SECONDS);
         UserSubscribe add = BeanUtil.toBean(bo, UserSubscribe.class);
         if(Validator.isEmpty(add.getOrderGoodsId())){
             throw new CustomException("缺失订单商品ID");
@@ -1475,6 +1487,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                         informUserAddBo.setUpdateTime(DateUtils.getNowTime());
                         informUserAddBo.setRemindId(17L);
                         informUserAddBo.setSystemStatus(1);
+                        informUserAddBo.setOrderGoodsId(userSubscribeVo.getOrderGoodsId());
                         informUserAddBo.setRemind("七大员新考考试通过提醒");
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
@@ -1490,6 +1503,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                         informUserAddBo.setUpdateTime(DateUtils.getNowTime());
                         informUserAddBo.setRemindId(17L);
                         informUserAddBo.setSystemStatus(3);
+                        informUserAddBo.setOrderGoodsId(userSubscribeVo.getOrderGoodsId());
                         informUserAddBo.setRemind("七大员新考考试通过提醒");
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
@@ -1513,6 +1527,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                         informUserAddBo.setUpdateTime(DateUtils.getNowTime());
                         informUserAddBo.setRemindId(18L);
                         informUserAddBo.setSystemStatus(1);
+                        informUserAddBo.setOrderGoodsId(userSubscribeVo.getOrderGoodsId());
                         informUserAddBo.setRemind("七大员新考考试不通过提醒");
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
@@ -1528,6 +1543,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                         informUserAddBo.setUpdateTime(DateUtils.getNowTime());
                         informUserAddBo.setRemindId(18L);
                         informUserAddBo.setSystemStatus(3);
+                        informUserAddBo.setOrderGoodsId(userSubscribeVo.getOrderGoodsId());
                         informUserAddBo.setRemind("七大员新考考试不通过提醒");
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/vo/SectionStudyRecordVo.java

@@ -77,4 +77,6 @@ public class SectionStudyRecordVo {
     private String goodsName;
     @ApiModelProperty("班级ID")
     private Long gradeId;
+    @ApiModelProperty("订单商品ID")
+    private Long orderGoodsId;
 }

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/wx/service/impl/WxPayServiceImpl.java

@@ -225,7 +225,7 @@ public class WxPayServiceImpl implements IWxPayService {
             data.put("device_info", "");
             data.put("fee_type", "CNY");
             data.put("total_fee", price.intValue() + "");
-            data.put("openid", openid);
+    //        data.put("openid", openid);
             data.put("spbill_create_ip", IpUtils.getIpAddr(ServletUtils.getRequest()));
             data.put("notify_url", notifyUrl);
             data.put("trade_type", "NATIVE");

+ 4 - 0
zhongzheng-system/src/main/resources/mapper/modules/activity/ActivityRecommendMapper.xml

@@ -58,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 LEFT JOIN goods g ON rg.goods_id = g.goods_id
         WHERE
             rg.recommend_id = #{recommend_id}
+        order by rg.sort asc
     </select>
 
     <select id="selectList" parameterType="com.zhongzheng.modules.activity.bo.ActivityRecommendQueryBo" resultMap="ActivityRecommendVoResult">
@@ -74,6 +75,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="platform != null and platform != ''">
             AND ar.platform = #{platform}
         </if>
+        <if test="businessId != null and businessId != ''">
+            AND ar.business_id = #{businessId}
+        </if>
     </select>
 
     <select id="getDetail" parameterType="com.zhongzheng.modules.activity.bo.ActivityRecommendQueryBo" resultMap="ActivityRecommendVoResult">

+ 3 - 1
zhongzheng-system/src/main/resources/mapper/modules/bank/QuestionMapper.xml

@@ -21,6 +21,7 @@
         <result property="code" column="code"/>
         <result property="importNo" column="import_no"/>
         <result property="createBy" column="create_by"/>
+        <result property="importSort" column="import_sort"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.bank.vo.QuestionVo" id="QuestionResultVo">
@@ -38,6 +39,7 @@
         <result property="code" column="code"/>
         <result property="createTime" column="create_time"/>
         <result property="updateTime" column="update_time"/>
+        <result property="importSort" column="import_sort"/>
         <collection property="businessList" column="question_id" select="findBusinessList" />
         <collection property="knowledgeList" column="knowledge_ids" select="findKnowledge"/>
         <collection property="examList" column="question_id" select="findExamList" />
@@ -205,7 +207,7 @@
         </if>
         GROUP BY
         q.question_id
-        ORDER BY q.question_id DESC
+        ORDER BY q.import_sort,q.question_id DESC
     </select>
 
     <select id="selectList_COUNT" resultType="Long">

+ 1 - 0
zhongzheng-system/src/main/resources/mapper/modules/inform/InformUserMapper.xml

@@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime" column="create_time"/>
         <result property="updateTime" column="update_time"/>
         <result property="orderGoodsId" column="order_goods_id"/>
+        <result property="status" column="status"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.inform.vo.InformUserVo" id="InformUserVo">

+ 8 - 2
zhongzheng-system/src/main/resources/mapper/modules/user/UserStudyRecordMapper.xml

@@ -78,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="moduleId" column="module_id"/>
         <result property="chapterId" column="chapter_id"/>
         <result property="gradeId" column="grade_id"/>
+        <result property="orderGoodsId" column="order_goods_id"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.user.vo.ExamStudyRecordVo" id="ExamStudyRecordVoResult">
@@ -1177,11 +1178,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             cs.cover_url,
             cs.duration_time,
             r.*,
-            g.goods_name
+            g.goods_name,
+            cgu.order_goods_id
         FROM
             (
                 SELECT
                     from_unixtime( usr.update_time, '%Y-%m-%d' ) date,
+        MAX( usr.update_time ) sort_time,
 		section_id,
 		MAX( usr.video_current_time ) video_current_time,
 		usr.goods_id,
@@ -1200,11 +1203,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                     usr.course_id,
                     usr.module_id,
                     usr.chapter_id,
+                    usr.grade_id,
                     usr.grade_id
+
             ) r
                 LEFT JOIN course_section cs ON r.section_id = cs.section_id
                 LEFT JOIN goods g ON g.goods_id = r.goods_id
+                LEFT JOIN class_grade_user cgu ON cgu.grade_id = r.grade_id and cgu.user_id = #{userId}
         ORDER BY
-            r.date DESC
+            r.sort_time DESC
     </select>
 </mapper>