Browse Source

Merge remote-tracking branch 'origin/master'

Joburgess 5 years ago
parent
commit
fb29879531

+ 0 - 1
cms/src/main/java/com/ym/mec/cms/controller/NewsController.java

@@ -45,7 +45,6 @@ public class NewsController extends BaseController {
 	@ApiOperation("资讯列表分页查询")
 	@GetMapping(value = "/homeList")
 	public Object getHomeList(NewsInformationQueryInfo queryInfo) {
-		queryInfo.setRows(5);
 		SysUser user = sysUserFeignService.queryUserInfo();
 		return succeed(sysNewsInformationService.getHomeList(user, queryInfo));
 	}

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupPaymentCalenderDao.java

@@ -123,7 +123,7 @@ public interface MusicGroupPaymentCalenderDao extends BaseDAO<Long, MusicGroupPa
 
     List<MusicGroupPaymentCalender> queryByIds(@Param("calenderId") Set<Long> calenderId);
 
-    List<Long> queryEndIds(@Param("configValue1") String configValue1, @Param("format") String format);
+    List<Long> queryEndIds(@Param("configValue") String configValue, @Param("format") String format);
 
     List<CalenderPushDto> getCalenderPushDto(@Param("calenderIds") Collection<Long> calenderIds);
 

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectChangeServiceImpl.java

@@ -299,6 +299,15 @@ public class SubjectChangeServiceImpl extends BaseServiceImpl<Integer, SubjectCh
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             subjectChange.setStatus(SubjectChangeStatusEnum.SUCCESSED);
             subjectChange.setUpdateTime(nowDate);
+            subjectChange.setSellTime(nowDate);
+
+            //乐器辅件价差大于0时,有销售金额
+            if (studentPaymentOrder.getActualAmount().compareTo(BigDecimal.ZERO) > 0) {
+                BigDecimal sellAmount = studentPaymentOrder.getActualAmount().multiply(subjectChange.getGoodsMargin())
+                        .divide(studentPaymentOrder.getExpectAmount(), 2, BigDecimal.ROUND_HALF_UP);
+                subjectChange.setSellAmount(sellAmount);
+            }
+
             if (this.update(subjectChange) <= 0) {
                 throw new BizException("维修单更新失败");
             }

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml

@@ -612,6 +612,6 @@
     <select id="getFirstEduTeacherId" resultType="java.lang.Integer">
         SELECT mg.educational_teacher_id_ FROM student_registration sr
         LEFT JOIN music_group mg ON mg.id_ = sr.music_group_id_
-        WHERE user_id_ = #{userId} AND mg.status_ != 'CANCELED' AND sr.music_group_status_ != 'QUIT' LIMIT 1
+        WHERE user_id_ = #{userId} AND mg.status_ != 'CANCELED' AND sr.music_group_status_ != 'QUIT' AND mg.educational_teacher_id_ IS NOT NULL LIMIT 1
     </select>
 </mapper>

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

@@ -240,7 +240,7 @@
         FROM music_group_payment_calender_detail mgpcd
         WHERE mgpcd.music_group_payment_calender_id_ IN
         (SELECT id_ FROM music_group_payment_calender WHERE payment_status_ != 0
-        AND DATEDIFF(start_payment_date_,#{format}) = #{configValue})
+        AND DATEDIFF(#{format},DATE_FORMAT(start_payment_date_,'%Y-%m-%d')) = #{configValue})
         AND mgpcd.payment_status_ = 'NON_PAYMENT'
         GROUP BY mgpcd.music_group_payment_calender_id_
     </select>
@@ -252,7 +252,7 @@
     </select>
     <select id="queryEndIds" resultType="java.lang.Long">
         SELECT DISTINCT mgpc.id_ FROM music_group_payment_calender mgpc
-        WHERE mgpc.payment_status_ = 2 AND DATEDIFF(#{format},DATE_FORMAT(mgpc.payment_valid_end_date_,'%Y-%m-%d')) = #{configValue1};
+        WHERE mgpc.payment_valid_end_date_ IS NOT NULL AND DATEDIFF(mgpc.payment_valid_end_date_,#{format}) = #{configValue};
     </select>
     <resultMap id="CalenderPushDto" type="com.ym.mec.biz.dal.dto.CalenderPushDto">
         <result property="paymentValidEndDate" column="payment_valid_end_date_"/>

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

@@ -101,12 +101,12 @@
 				AND spo.status_ = #{status}
 			</if>
 			<if test="search != null and search != ''">
-				AND (su.user_name_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
+				AND (su.username_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
 			</if>
 		</where>
 	</sql>
 	<select id="queryStudentGoodsOrders" resultMap="StudentGoodsSellDto">
-		SELECT spo.*,sgs.goods_json_,sgs.total_amount_,sgs.market_amount_,su.user_name_ FROM student_payment_order spo
+		SELECT spo.*,sgs.goods_json_,sgs.total_amount_,sgs.market_amount_,su.username_ FROM student_payment_order spo
 		LEFT JOIN student_goods_sell sgs ON spo.order_no_ = sgs.order_no_
 		LEFT JOIN sys_user su ON sgs.user_id_ = su.id_
 		<include refid="queryStudentGoodsOrdersSql"/>

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

@@ -17,7 +17,6 @@ import com.ym.mec.biz.service.*;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.exception.BizException;
-import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;