huangxuechao hace 4 años
padre
commit
5cdccc4219

+ 11 - 1
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/policy/controller/CwjsPolicyInfoController.java

@@ -350,6 +350,12 @@ public class CwjsPolicyInfoController {
 				}
 			});
 
+			if(cwjsPolicyInfo.getAdvancePay() == 1){
+				cwjsPolicyInfo.setIsDianPay(null);
+				cwjsPolicyInfo.setDianPayCompanyName(null);
+				cwjsPolicyInfo.setDianPayCompanyRebateRate(null);
+			}
+
 			cwjsPolicyInfoService.save(cwjsPolicyInfo);
 			JSONArray products = cwjsPolicyInfo.getPolicyProductName();
 			List<CwjsPolicyProduct> policyProductList = new ArrayList<>();
@@ -411,7 +417,11 @@ public class CwjsPolicyInfoController {
 				policyProductList.add(policyProduct);
 			});
 			cwjsPolicyProductService.saveBatch(policyProductList);
-
+			if(cwjsPolicyInfo.getAdvancePay() == 1){
+				cwjsPolicyInfo.setIsDianPay(null);
+				cwjsPolicyInfo.setDianPayCompanyName(null);
+				cwjsPolicyInfo.setDianPayCompanyRebateRate(null);
+			}
 			boolean ok = cwjsPolicyInfoService.updateById(cwjsPolicyInfo);
 			if(ok) {
 				result.success("修改成功!");

+ 2 - 2
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/policy/mapper/xml/CwjsPolicyInfoMapper.xml

@@ -23,7 +23,7 @@
         <if test="promotionType != null">and t2.promotion_type = #{promotionType}</if>
         <if test="approvedStatus != null and approvedStatus != ''">and t2.approved_status = #{approvedStatus}</if>
         <if test="startTime != null and startTime != ''">and t2.create_time &gt;= #{startTime}</if>
-        <if test="endTime != null and endTime != ''">and t2.create_time &lt;= #{endTime}</if>
+        <if test="endTime != null and endTime != ''">and t2.create_time &lt;= concat(#{endTime},' 23:59:59')</if>
         <if test="approvedProgress != null and approvedProgress != ''">and t2.approved_progress = #{approvedProgress}</if>
         order by t2.create_time desc
     </select>
@@ -51,7 +51,7 @@
     </select>
 
     <select id="getAllSaleByUserId" resultType="com.alibaba.fastjson.JSONObject">
-        SELECT t1.create_user_id AS 'userId',
+        SELECT distinct t1.create_user_id AS 'userId',
 	           t1.create_user_name AS 'userName'
         FROM
             ctop_cwjs_policy_info t1