소스 검색

Merge remote-tracking branch 'origin/master'

周箭河 4 년 전
부모
커밋
2cd298a4df

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/StudentGoodsSellService.java

@@ -3,6 +3,7 @@ package com.ym.mec.biz.service;
 
 import com.ym.mec.biz.dal.dto.StudentGoodsSellDto;
 import com.ym.mec.biz.dal.entity.StudentGoodsSell;
+import com.ym.mec.biz.dal.page.GoodsSellQueryInfo;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.BaseService;
@@ -18,5 +19,5 @@ public interface StudentGoodsSellService extends BaseService<Integer, StudentGoo
      * @param queryInfo:
      * @return java.lang.Object
      */
-    PageInfo<StudentGoodsSellDto> queryStudentGoodsOrders(QueryInfo queryInfo);
+    PageInfo<StudentGoodsSellDto> queryStudentGoodsOrders(GoodsSellQueryInfo queryInfo);
 }

+ 6 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ContractServiceImpl.java

@@ -62,6 +62,7 @@ import com.ym.mec.util.freemarker.FreemarkerTemplateEngine;
 import com.ym.mec.util.money.MoneyUtil;
 import com.ym.mec.util.pdf.PDFUtil;
 import org.springframework.transaction.annotation.Isolation;
+import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
@@ -946,11 +947,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 		SysUser user = studentDao.lockUserReturnInfo(userId);
 
 		if (user == null) {
-			throw new BizException("用户不存在");
-		}
-
-		if(StringUtils.isBlank(user.getRealName())||StringUtils.isBlank(user.getIdCardNo())){
-			throw new BizException("身份信息不全");
+			return false;
 		}
 
 		List<SysUserContracts> userContracts = sysUserContractsService.getUserContractWithType(userId, ContractType.PRODUCT);
@@ -958,6 +955,10 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 			return true;
 		}
 
+		if(StringUtils.isBlank(user.getRealName())||StringUtils.isBlank(user.getIdCardNo())){
+			return false;
+		}
+
 		SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
 		if (sysUserTsign == null) {
 			sysUserTsign = register(userId, user.getRealName(), user.getIdCardNo(), user.getPhone());

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -157,7 +157,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		Date date = new Date();
 		String format = DateUtil.format(date, DateUtil.DEFAULT_PATTERN);
 		//将有效期已截止的学员缴费信息修改为未缴费
-		musicGroupStudentFeeDao.updateFeeStatus();
+//		musicGroupStudentFeeDao.updateFeeStatus();
 		//获取距离缴费开启指定天数后的缴费明细
 		String configValue = sysConfigDao.findConfigValue("push_payment_detail");
 		Map<Long, Long> maps = MapUtil.convertIntegerMap(musicGroupPaymentCalenderDao.queryCalenderByDay(configValue));

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentGoodsSellServiceImpl.java

@@ -4,6 +4,7 @@ package com.ym.mec.biz.service.impl;
 import com.ym.mec.biz.dal.dao.StudentGoodsSellDao;
 import com.ym.mec.biz.dal.dto.StudentGoodsSellDto;
 import com.ym.mec.biz.dal.entity.StudentGoodsSell;
+import com.ym.mec.biz.dal.page.GoodsSellQueryInfo;
 import com.ym.mec.biz.service.StudentGoodsSellService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.page.PageInfo;
@@ -30,7 +31,7 @@ public class StudentGoodsSellServiceImpl extends BaseServiceImpl<Integer, Studen
 	}
 
 	@Override
-	public PageInfo<StudentGoodsSellDto> queryStudentGoodsOrders(QueryInfo queryInfo) {
+	public PageInfo<StudentGoodsSellDto> queryStudentGoodsOrders(GoodsSellQueryInfo queryInfo) {
 		//根据订单状态和教务老师获取订单列表
 		PageInfo<StudentGoodsSellDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
 		Map<String, Object> params = new HashMap<String, Object>();

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/StudentGoodsSellMapper.xml

@@ -79,7 +79,7 @@
 	</select>
     <select id="countStudentGoodsOrders" resultType="java.lang.Integer">
 		SELECT COUNT(spo.id_) FROM student_payment_order spo
-		LEFT JOIN student_goods_sell sgs ON spo.id_ = sgs.order_no_
+		LEFT JOIN student_goods_sell sgs ON spo.order_no_ = sgs.order_no_
 		<include refid="queryStudentGoodsOrdersSql"/>
 	</select>
 	<resultMap type="com.ym.mec.biz.dal.dto.StudentGoodsSellDto" id="StudentGoodsSellDto" extends="com.ym.mec.biz.dal.dao.StudentPaymentOrderDao.StudentPaymentOrder">
@@ -102,7 +102,7 @@
 	</sql>
 	<select id="queryStudentGoodsOrders" resultMap="StudentGoodsSellDto">
 		SELECT spo.*,sgs.goods_json_,sgs.total_amount_,sgs.market_amount_ FROM student_payment_order spo
-		LEFT JOIN student_goods_sell sgs ON spo.id_ = sgs.order_no_
+		LEFT JOIN student_goods_sell sgs ON spo.order_no_ = sgs.order_no_
 		<include refid="queryStudentGoodsOrdersSql"/>
 		ORDER BY spo.create_time_ DESC
 		<include refid="global.limit"/>

+ 6 - 0
mec-student/src/main/java/com/ym/mec/student/controller/RepairController.java

@@ -141,4 +141,10 @@ public class RepairController extends BaseController {
         queryInfo.setStudentId(sysUser.getId());
         return succeed(studentGoodsSellService.queryStudentGoodsOrders(queryInfo));
     }
+
+    @ApiOperation(value = "获取学员商品订单")
+    @GetMapping("/getStudentGoodsOrder")
+    public Object getStudentGoodsOrder(Integer goodsSellId) {
+        return succeed(studentGoodsSellService.get(goodsSellId));
+    }
 }

+ 42 - 0
mec-web/src/main/java/com/ym/mec/web/controller/education/EduContractsController.java

@@ -0,0 +1,42 @@
+package com.ym.mec.web.controller.education;
+
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.service.ContractService;
+import com.ym.mec.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Objects;
+
+/**
+ * @Author Joburgess
+ * @Date 2020.09.24
+ */
+@RequestMapping("eduContracts")
+@Api(tags = "协议服务")
+@RestController
+public class EduContractsController extends BaseController {
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+
+    @Autowired
+    private ContractService contractService;
+
+    @ApiOperation("查询产品协议")
+    @GetMapping(value = "queryProduceContract")
+    public Object queryProduceContract(Integer userId, String musicGroupId) {
+        if(Objects.isNull(userId)){
+            SysUser sysUser = sysUserFeignService.queryUserInfo();
+            if (sysUser == null) {
+                return failed("获取用户信息失败");
+            }
+            userId = sysUser.getId();
+        }
+        return succeed(contractService.queryProductContract(userId,musicGroupId));
+    }
+}