浏览代码

礼品领取日志

huan.wang@yueguanjia.com 5 年之前
父节点
当前提交
49b2c69292

+ 32 - 0
src/main/java/com/ygj/yuemum/controller/college/CollegePresentScholarshipsLogsController.java

@@ -0,0 +1,32 @@
+package com.ygj.yuemum.controller.college;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.serializer.SerializerFeature;
+import com.ygj.yuemum.domain.college.CollegePresentScholarshipsLogs;
+import com.ygj.yuemum.service.college.CollegePresentScholarshipsLogsService;
+import com.ygj.yuemum.service.college.CollegeScholarshipsDetailService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Map;
+
+@RestController
+public class CollegePresentScholarshipsLogsController {
+
+    @Autowired
+    private CollegePresentScholarshipsLogsService collegePresentScholarshipsLogsService;
+
+    @PostMapping("/queryUserScholarshipsLog") //++++++
+    public String queryUserScholarshipsLog(@ModelAttribute CollegePresentScholarshipsLogs collegePresentScholarshipsLogs ) {
+        Map<String, Object> collegeCurriculumCores = collegePresentScholarshipsLogsService.queryScholarshipsLogs(collegePresentScholarshipsLogs);
+        String jso = JSONObject.toJSONString(collegeCurriculumCores);
+        return jso;
+    }
+
+
+}

+ 8 - 0
src/main/java/com/ygj/yuemum/controller/wxmini/WXMktInfoController.java

@@ -20,4 +20,12 @@ public class WXMktInfoController {
         List<WXMktInfo> mktInfos = mktInfoService.getMktInfos(mi_branche_code);
         List<WXMktInfo> mktInfos = mktInfoService.getMktInfos(mi_branche_code);
         return mktInfos;
         return mktInfos;
     }
     }
+
+    @GetMapping("/getAllMkt")
+    public List<WXMktInfo> getAllMkt() {
+        List<WXMktInfo> mktInfos = mktInfoService.getAllMkt();
+        return mktInfos;
+    }
+
+
 }
 }

+ 2 - 0
src/main/java/com/ygj/yuemum/dao/college/CollegePresentScholarshipsLogsDao.java

@@ -10,6 +10,8 @@ public interface CollegePresentScholarshipsLogsDao {
 
 
     List<CollegePresentScholarshipsLogs> getAll();
     List<CollegePresentScholarshipsLogs> getAll();
 
 
+    List<CollegePresentScholarshipsLogs> queryScholarshipsLogs(CollegePresentScholarshipsLogs record);
+
     CollegePresentScholarshipsLogs selectByPrimaryKey(Integer id);
     CollegePresentScholarshipsLogs selectByPrimaryKey(Integer id);
 
 
     int deleteByPrimaryKey(Integer id);
     int deleteByPrimaryKey(Integer id);

+ 2 - 0
src/main/java/com/ygj/yuemum/dao/wxmini/WXMktInfoDao.java

@@ -9,4 +9,6 @@ import java.util.List;
 public interface WXMktInfoDao {
 public interface WXMktInfoDao {
 
 
     List<WXMktInfo> getMktInfos(Integer mi_branche_code);
     List<WXMktInfo> getMktInfos(Integer mi_branche_code);
+
+    List<WXMktInfo> getAll();
 }
 }

+ 27 - 0
src/main/java/com/ygj/yuemum/domain/college/CollegePresentScholarshipsLogs.java

@@ -5,15 +5,42 @@ public class CollegePresentScholarshipsLogs {
     private Integer id;
     private Integer id;
     private String openid;
     private String openid;
     private Integer present_id;
     private Integer present_id;
+    private String present_name;
     private Integer type;
     private Integer type;
     private String create_at;
     private String create_at;
     private String collection_date;
     private String collection_date;
     private Integer mkt_id;
     private Integer mkt_id;
+    private String mkt_name;
     private String address;
     private String address;
     private String coupon_number;
     private String coupon_number;
+    private String xu_phone;
     private Integer page;
     private Integer page;
     private Integer limit;
     private Integer limit;
 
 
+    public String getPresent_name() {
+        return present_name;
+    }
+
+    public void setPresent_name(String present_name) {
+        this.present_name = present_name;
+    }
+
+    public String getMkt_name() {
+        return mkt_name;
+    }
+
+    public void setMkt_name(String mkt_name) {
+        this.mkt_name = mkt_name;
+    }
+
+    public String getXu_phone() {
+        return xu_phone;
+    }
+
+    public void setXu_phone(String xu_phone) {
+        this.xu_phone = xu_phone;
+    }
+
     public String getCoupon_number() {
     public String getCoupon_number() {
         return coupon_number;
         return coupon_number;
     }
     }

+ 15 - 2
src/main/java/com/ygj/yuemum/service/college/CollegePresentScholarshipsLogsService.java

@@ -1,13 +1,15 @@
 package com.ygj.yuemum.service.college;
 package com.ygj.yuemum.service.college;
 
 
-import com.ygj.yuemum.dao.college.CollegePresentScholarshipsDao;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import com.ygj.yuemum.dao.college.CollegePresentScholarshipsLogsDao;
 import com.ygj.yuemum.dao.college.CollegePresentScholarshipsLogsDao;
-import com.ygj.yuemum.domain.college.CollegePresentScholarships;
 import com.ygj.yuemum.domain.college.CollegePresentScholarshipsLogs;
 import com.ygj.yuemum.domain.college.CollegePresentScholarshipsLogs;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.List;
+import java.util.Map;
 
 
 @Service
 @Service
 public class CollegePresentScholarshipsLogsService {
 public class CollegePresentScholarshipsLogsService {
@@ -20,6 +22,17 @@ public class CollegePresentScholarshipsLogsService {
         return collegePresentScholarshipsLogs;
         return collegePresentScholarshipsLogs;
     }
     }
 
 
+    public Map<String, Object> queryScholarshipsLogs(CollegePresentScholarshipsLogs collegePresentScholarshipsLogs) {
+        PageHelper.startPage(collegePresentScholarshipsLogs.getPage(), collegePresentScholarshipsLogs.getLimit());
+        List<CollegePresentScholarshipsLogs> collegeCurriculumCores = collegePresentScholarshipsLogsDao.queryScholarshipsLogs(collegePresentScholarshipsLogs);
+        PageInfo<CollegePresentScholarshipsLogs> pageInfo = new PageInfo<CollegePresentScholarshipsLogs>(collegeCurriculumCores);
+        long count = pageInfo.getTotal(); //获取总记录数
+        Map<String, Object> tableData = new HashMap<>();
+        tableData.put("items", collegeCurriculumCores);
+        tableData.put("total", count);
+        return tableData;
+    }
+
     public CollegePresentScholarshipsLogs getCollegePresentScholarshipsLog(Integer id) {
     public CollegePresentScholarshipsLogs getCollegePresentScholarshipsLog(Integer id) {
         CollegePresentScholarshipsLogs collegePresentScholarshipsLogs = collegePresentScholarshipsLogsDao.selectByPrimaryKey(id);
         CollegePresentScholarshipsLogs collegePresentScholarshipsLogs = collegePresentScholarshipsLogsDao.selectByPrimaryKey(id);
         return collegePresentScholarshipsLogs;
         return collegePresentScholarshipsLogs;

+ 3 - 0
src/main/java/com/ygj/yuemum/service/wxmini/WXMktInfoService.java

@@ -18,5 +18,8 @@ public class WXMktInfoService {
         return mktInfoDao.getMktInfos(mi_branche_code);
         return mktInfoDao.getMktInfos(mi_branche_code);
     }
     }
 
 
+    public List<WXMktInfo> getAllMkt() {
+        return mktInfoDao.getAll();
+    }
 
 
 }
 }

+ 2 - 2
src/main/resources/application.yml

@@ -146,8 +146,8 @@ baidu:
   BANKCARD: "https://aip.baidubce.com/rest/2.0/ocr/v1/bankcard"
   BANKCARD: "https://aip.baidubce.com/rest/2.0/ocr/v1/bankcard"
 api:
 api:
   MDJAPIURL: "http://120.55.37.107:8763/introduce/activity"
   MDJAPIURL: "http://120.55.37.107:8763/introduce/activity"
-  BIZOBJECTSERVICE: "http://47.111.190.117:8090/edw/h3/operateObjects"
-#  BIZOBJECTSERVICE: "http://47.111.190.117:8090/edw/h3/operateObjects"
+  BIZOBJECTSERVICE: "http://47.111.190.117:8088/edw/h3/operateObjects"
+#  BIZOBJECTSERVICE: "http://47.111.190.117:8088/edw/h3/operateObjects"
   BIZUSERSERVICE: "https://www.h3yun.com/OpenApi/Invoke"
   BIZUSERSERVICE: "https://www.h3yun.com/OpenApi/Invoke"
 #  BIZOBJECTSERVICE: "http://192.168.1.213:8010/h3/operateObjects"
 #  BIZOBJECTSERVICE: "http://192.168.1.213:8010/h3/operateObjects"
 college:
 college:

+ 43 - 0
src/main/resources/mybatis/mapper/college/CollegePresentScholarshipsLogsMapper.xml

@@ -22,6 +22,49 @@
         order by id desc
         order by id desc
     </select>
     </select>
 
 
+    <select id="queryScholarshipsLogs" resultType="com.ygj.yuemum.domain.college.CollegePresentScholarshipsLogs" parameterType="com.ygj.yuemum.domain.college.CollegePresentScholarshipsLogs">
+        select
+            ta.id,
+            ta.openid,
+            ta.present_id,
+            (select `name` from college_present_scholarships where id = ta.present_id) as present_name,
+            ta.type,
+            ta.create_at,
+            ta.collection_date,
+            ta.mkt_id,
+            (select mi_mktname from wx_mkt_info where id = ta.mkt_id) as mkt_name,
+            ta.address,
+            ta.coupon_number,
+            tb.xu_phone
+        from college_present_scholarships_logs ta LEFT JOIN wx_user tb ON ta.openid = tb.xu_openid
+        where 1=1
+        <if test="present_id != null and present_id != ''">
+            and present_id = #{present_id,jdbcType=INTEGER}
+        </if>
+        <if test="type != null and type != ''">
+            and `type` = #{type,jdbcType=INTEGER}
+        </if>
+        <if test="create_at != null and create_at != ''">
+            and DATE_FORMAT(create_at,'%Y-%m-%d') = DATE_FORMAT(#{create_at,jdbcType=DATE},'%Y-%m-%d')
+        </if>
+        <if test="collection_date != null and collection_date != ''">
+            and DATE_FORMAT(collection_date,'%Y-%m-%d') = DATE_FORMAT(#{collection_date,jdbcType=DATE},'%Y-%m-%d')
+        </if>
+        <if test="mkt_id != null and mkt_id != ''">
+            and mkt_id = #{mkt_id,jdbcType=INTEGER}
+        </if>
+        <if test="address != null and address != ''">
+            and address like "%"#{address,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="coupon_number != null and coupon_number != ''">
+            and coupon_number = #{coupon_number,jdbcType=VARCHAR}
+        </if>
+        <if test="xu_phone != null and xu_phone != ''">
+            and xu_phone = #{xu_phone,jdbcType=VARCHAR}
+        </if>
+        order by ta.id desc
+    </select>
+
     <select id="selectByPrimaryKey" resultType="com.ygj.yuemum.domain.college.CollegePresentScholarshipsLogs"
     <select id="selectByPrimaryKey" resultType="com.ygj.yuemum.domain.college.CollegePresentScholarshipsLogs"
             parameterType="java.lang.Integer">
             parameterType="java.lang.Integer">
         select
         select

+ 8 - 0
src/main/resources/mybatis/mapper/wxmini/WXMktInfoMapper.xml

@@ -30,4 +30,12 @@
         order by field(mi_branche_code,#{mi_branche_code,jdbcType=INTEGER}) desc
         order by field(mi_branche_code,#{mi_branche_code,jdbcType=INTEGER}) desc
     </select>
     </select>
 
 
+    <select id="getAll" resultType="com.ygj.yuemum.domain.wxmini.WXMktInfo" >
+        SELECT
+           *
+        FROM
+            wx_mkt_info
+        order by id asc
+    </select>
+
 </mapper>
 </mapper>