فهرست منبع

非油品参数接口调整

jk-GitHub-coder 4 سال پیش
والد
کامیت
576e3e9149

+ 7 - 1
YijiaRestful/src/main/java/com/platform/yijia/controller/PayController.java

@@ -665,7 +665,13 @@ public class PayController {
                             //客户积分
                             IntegralRule integralRule  =new IntegralRule();
                             integralRule.setStationId(Integer.valueOf(infoMap.get("stationId").toString()));
-                            integralRule.setOilName(infoMap.get("oilName").toString());
+                            if(infoMap.containsKey("orderType") && infoMap.get("orderType").toString().equals("1")){
+                                integralRule.setOilName(infoMap.get("oilName").toString());
+                                integralRule.setOilType(infoMap.get("orderType").toString());
+                            }else if(infoMap.containsKey("orderType") && infoMap.get("orderType").toString().equals("2")){
+                                integralRule.setOilType(infoMap.get("orderType").toString());
+                            }
+
                             //获取该油站的积分规则
                             List<IntegralRule> rule = integralRuleService.getIntegralRule(integralRule);
                             if(rule !=null && rule.size() > 0 && rule.get(0).getEmptyDate().compareTo(new Date()) ==1){

+ 0 - 112
YijiaRestful/src/main/java/com/platform/yijia/controller/StationClassesSummaryController.java

@@ -1,112 +0,0 @@
-//package com.platform.yijia.controller;
-//
-//import java.util.Arrays;
-//import java.util.List;
-//
-//import com.platform.yijia.pojo.StationClassesSummary;
-//import com.platform.yijia.service.IStationClassesSummaryService;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.stereotype.Controller;
-//import org.springframework.web.bind.annotation.GetMapping;
-//import org.springframework.web.bind.annotation.PostMapping;
-//import org.springframework.web.bind.annotation.PutMapping;
-//import org.springframework.web.bind.annotation.DeleteMapping;
-//import org.springframework.web.bind.annotation.PathVariable;
-//import org.springframework.web.bind.annotation.RequestBody;
-//import org.springframework.web.bind.annotation.RequestMapping;
-//import org.springframework.web.bind.annotation.RestController;
-//
-///**
-// * 【请填写功能名称】Controller
-// *
-// * @author yijia
-// * @date 2020-12-28
-// */
-//@Controller
-//@RequestMapping("/api")
-//public class StationClassesSummaryController
-//{
-//    @Autowired
-//    private IStationClassesSummaryService stationClassesSummaryService;
-//    @Autowired
-//    private ISysUserService sysUserService;
-//    /**
-//     * 查询【请填写功能名称】列表
-//     */
-//    @GetMapping("/list")
-//    public TableDataInfo list(StationClassesSummary stationClassesSummary)
-//    {
-//        LoginUser currentUser = SecurityUtils.getLoginUser();
-//        String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
-//        if(selectDeptid !=null && selectDeptid!=""){
-//            List<String> list = Arrays.asList(selectDeptid.split(","));
-//            stationClassesSummary.setStationIdList(list);
-//        }
-//        startPage();
-////        stationClassesSummary.setStationId(Long.valueOf("5"));
-//        List<StationClassesSummary> list = stationClassesSummaryService.selectStationClassesSummaryList(stationClassesSummary);
-//        return getDataTable(list);
-//    }
-//
-//    /**
-//     * 导出【请填写功能名称】列表
-//     */
-//    @PreAuthorize("@ss.hasPermi('station:summary:export')")
-//    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
-//    @GetMapping("/export")
-//    public AjaxResult export(StationClassesSummary stationClassesSummary)
-//    {
-//        LoginUser currentUser = SecurityUtils.getLoginUser();
-//        String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
-//        if(selectDeptid !=null && selectDeptid!=""){
-//            List<String> list = Arrays.asList(selectDeptid.split(","));
-//            stationClassesSummary.setStationIdList(list);
-//        }
-//        List<StationClassesSummary> list = stationClassesSummaryService.selectStationClassesSummaryList(stationClassesSummary);
-//        ExcelUtil<StationClassesSummary> util = new ExcelUtil<StationClassesSummary>(StationClassesSummary.class);
-//        return util.exportExcel(list, "summary");
-//    }
-//
-//    /**
-//     * 获取【请填写功能名称】详细信息
-//     */
-//    @PreAuthorize("@ss.hasPermi('station:summary:query')")
-//    @GetMapping(value = "/{id}")
-//    public AjaxResult getInfo(@PathVariable("id") Long id)
-//    {
-//        return AjaxResult.success(stationClassesSummaryService.selectStationClassesSummaryById(id));
-//    }
-//
-//    /**
-//     * 新增【请填写功能名称】
-//     */
-//    @PreAuthorize("@ss.hasPermi('station:summary:add')")
-//    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
-//    @PostMapping
-//    public AjaxResult add(@RequestBody StationClassesSummary stationClassesSummary)
-//    {
-//        return toAjax(stationClassesSummaryService.insertStationClassesSummary(stationClassesSummary));
-//    }
-//
-//    /**
-//     * 修改【请填写功能名称】
-//     */
-//    @PreAuthorize("@ss.hasPermi('station:summary:edit')")
-//    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
-//    @PutMapping
-//    public AjaxResult edit(@RequestBody StationClassesSummary stationClassesSummary)
-//    {
-//        return toAjax(stationClassesSummaryService.updateStationClassesSummary(stationClassesSummary));
-//    }
-//
-//    /**
-//     * 删除【请填写功能名称】
-//     */
-//    @PreAuthorize("@ss.hasPermi('station:summary:remove')")
-//    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
-//	@DeleteMapping("/{ids}")
-//    public AjaxResult remove(@PathVariable Long[] ids)
-//    {
-//        return toAjax(stationClassesSummaryService.deleteStationClassesSummaryByIds(ids));
-//    }
-//}

+ 4 - 1
YijiaRestful/src/main/java/com/platform/yijia/pojo/IntegralRule.java

@@ -22,5 +22,8 @@ public class IntegralRule {
     private String integralProportion;              //'积分比例',
     private String integralDeductionOil;      //'积分抵扣油品规则',
     private List<IntegralRuleDetail> integralRuleDetailList;  //积分规则明细实体类
-    private String oilName;        //'油品名称',
+
+    //此下参数用作SQL条件传参使用
+    private String oilName;        //'油品名称 此属性用作传参',
+    private String oilType;        //'油品类型 此属性用作传参',
 }

+ 9 - 6
YijiaRestful/src/main/resources/mapper/IntegralRuleMapper.xml

@@ -58,12 +58,15 @@
     FROM
         integral_rule AS T1 LEFT JOIN integral_rule_detail AS T2 ON T1.id = T2.parent_id
     <where>
-      <if test="stationId !=null and stationId !=''">
-         T1.station_id = #{stationId}
-      </if>
-      <if test="oilName !=null and oilName !=''">
-        AND T2.oil_name = #{oilName}
-      </if>
+          <if test="stationId !=null and stationId !=''">
+             T1.station_id = #{stationId}
+          </if>
+          <if test="oilName !=null and oilName !=''">
+            AND T2.oil_name = #{oilName}
+          </if>
+          <if test="oilType !=null and oilType !=''">
+            AND T2.oil_type = #{oilType}
+          </if>
     </where>
     ORDER BY T2.rule_terms DESC
   </select>

+ 2 - 2
YijiaRestful/src/main/resources/mapper/PayOrderMapper.xml

@@ -775,8 +775,8 @@
         B.union_id              AS unionId,
         B.mobile_phone			AS mobilePhone
     FROM
-        pay_order AS A
-    LEFT JOIN app_user_info AS B ON A.consumer_id = B.user_id
+         pay_order              AS A
+    LEFT JOIN app_user_info     AS B ON A.consumer_id = B.user_id
     WHERE
         A.order_no = #{orderNo}
   </select>