fllmoyu 4 роки тому
батько
коміт
71d006539d

+ 25 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dao/BillDetailInfoDAO.java

@@ -0,0 +1,25 @@
+package com.jpsoft.enterprise.modules.base.dao;
+
+import com.jpsoft.enterprise.modules.base.entity.BillDetailInfo;
+import com.jpsoft.enterprise.modules.base.entity.BillInfo;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 16:05
+ */
+@Repository
+public interface BillDetailInfoDAO {
+
+    int insert(BillDetailInfo entity);
+    int update(BillDetailInfo entity);
+    int exist(String id);
+    BillDetailInfo get(String id);
+    int delete(String id);
+    List<BillDetailInfo> list();
+    List<BillDetailInfo> search(Map<String,Object> searchParams, List<Sort> sortList);
+}

+ 23 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/dao/BillInfoDAO.java

@@ -0,0 +1,23 @@
+package com.jpsoft.enterprise.modules.base.dao;
+
+import com.jpsoft.enterprise.modules.base.entity.BillInfo;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 15:32
+ */
+@Repository
+public interface BillInfoDAO {
+    int insert(BillInfo entity);
+    int update(BillInfo entity);
+    int exist(String id);
+    BillInfo get(String id);
+    int delete(String id);
+    List<BillInfo> list();
+    List<BillInfo> search(Map<String,Object> searchParams, List<Sort> sortList);
+}

+ 63 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/entity/BillDetailInfo.java

@@ -0,0 +1,63 @@
+package com.jpsoft.enterprise.modules.base.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 15:51
+ */
+@Data
+public class BillDetailInfo {
+
+   private String id;
+
+   private String billId;
+
+   private String orderId;
+
+   private String companyId;
+
+   private String billDetail;
+
+   @ApiModelProperty(value = "推送状态")
+   private String rushStatus;
+
+   /**
+    * 是否删除
+    */
+   @ApiModelProperty(value = "是否删除")
+   private Boolean delFlag;
+   /**
+    * 创建人
+    */
+   @ApiModelProperty(value = "创建人")
+   private String createBy;
+   /**
+    * 创建时间
+    */
+   @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+   @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+   @ApiModelProperty(value = "创建时间")
+   private Date createTime;
+   /**
+    * 更新人
+    */
+   @ApiModelProperty(value = "更新人")
+   private String updateBy;
+   /**
+    * 更新时间
+    */
+   @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+   @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+   @ApiModelProperty(value = "更新时间")
+   private Date updateTime;
+
+   private Integer sortNo;
+
+
+}

+ 64 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/entity/BillInfo.java

@@ -0,0 +1,64 @@
+package com.jpsoft.enterprise.modules.base.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 15:23
+ */
+@Data
+@ApiModel(value = "base_bill_info的实体类")
+public class BillInfo {
+
+    private String id;
+
+    @ApiModelProperty(value = "总账单名称")
+    private String billName;
+
+    @ApiModelProperty(value = "账单备注")
+    private String billRemark;
+
+    @ApiModelProperty(value = "手机端会费公示")
+    private Boolean wxShow;
+
+    @ApiModelProperty(value = "总账单的发送状态")
+    private String status;
+
+    /**
+     * 是否删除
+     */
+    @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+
+}

+ 24 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/BillDetailInfoService.java

@@ -0,0 +1,24 @@
+package com.jpsoft.enterprise.modules.base.service;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.base.entity.BillDetailInfo;
+import com.jpsoft.enterprise.modules.base.entity.BillInfo;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 16:02
+ */
+public interface BillDetailInfoService {
+
+    BillDetailInfo get(String id);
+    boolean exist(String id);
+    int insert(BillDetailInfo model);
+    int update(BillDetailInfo model);
+    int delete(String id);
+    List<BillDetailInfo> list();
+    Page<BillDetailInfo> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+}

+ 23 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/BillInfoService.java

@@ -0,0 +1,23 @@
+package com.jpsoft.enterprise.modules.base.service;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.enterprise.modules.base.entity.BillInfo;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 15:29
+ */
+public interface BillInfoService {
+
+    BillInfo get(String id);
+    boolean exist(String id);
+    int insert(BillInfo model);
+    int update(BillInfo model);
+    int delete(String id);
+    List<BillInfo> list();
+    Page<BillInfo> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+}

+ 74 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/BillDetailInfoServiceImpl.java

@@ -0,0 +1,74 @@
+package com.jpsoft.enterprise.modules.base.service.impl;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.jpsoft.enterprise.modules.base.dao.BillDetailInfoDAO;
+import com.jpsoft.enterprise.modules.base.entity.BillDetailInfo;
+import com.jpsoft.enterprise.modules.base.service.BillDetailInfoService;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 16:03
+ */
+@Transactional
+@Component(value="billDetailInfoService")
+public class BillDetailInfoServiceImpl implements BillDetailInfoService {
+
+
+    @Resource(name="billDetailInfoDAO")
+    private BillDetailInfoDAO billDetailInfoDAO;
+
+    @Override
+    public BillDetailInfo get(String id) {
+        // TODO Auto-generated method stub
+        return billDetailInfoDAO.get(id);
+    }
+
+    @Override
+    public int insert(BillDetailInfo model) {
+
+        return billDetailInfoDAO.insert(model);
+    }
+
+    @Override
+    public int update(BillDetailInfo model) {
+        // TODO Auto-generated method stub
+        return billDetailInfoDAO.update(model);
+    }
+
+    @Override
+    public int delete(String id) {
+        // TODO Auto-generated method stub
+        return billDetailInfoDAO.delete(id);
+    }
+
+    @Override
+    public boolean exist(String id) {
+        // TODO Auto-generated method stub
+        int count = billDetailInfoDAO.exist(id);
+
+        return count > 0 ? true : false;
+    }
+
+    @Override
+    public List<BillDetailInfo> list() {
+        // TODO Auto-generated method stub
+        return billDetailInfoDAO.list();
+    }
+
+    @Override
+    public Page<BillDetailInfo> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize, boolean count, List<Sort> sortList) {
+        Page<BillDetailInfo> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            billDetailInfoDAO.search(searchParams,sortList);
+        });
+
+        return page;
+    }
+}

+ 73 - 0
common/src/main/java/com/jpsoft/enterprise/modules/base/service/impl/BillInfoServiceImpl.java

@@ -0,0 +1,73 @@
+package com.jpsoft.enterprise.modules.base.service.impl;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.jpsoft.enterprise.modules.base.dao.BillInfoDAO;
+import com.jpsoft.enterprise.modules.base.entity.BillInfo;
+import com.jpsoft.enterprise.modules.base.service.BillInfoService;
+import com.jpsoft.enterprise.modules.common.dto.Sort;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 15:30
+ */
+@Transactional
+@Component(value="billInfoService")
+public class BillInfoServiceImpl implements BillInfoService {
+
+    @Resource(name="billInfoDAO")
+    private BillInfoDAO billInfoDAO;
+
+    @Override
+    public BillInfo get(String id) {
+        // TODO Auto-generated method stub
+        return billInfoDAO.get(id);
+    }
+
+    @Override
+    public int insert(BillInfo model) {
+
+        return billInfoDAO.insert(model);
+    }
+
+    @Override
+    public int update(BillInfo model) {
+        // TODO Auto-generated method stub
+        return billInfoDAO.update(model);
+    }
+
+    @Override
+    public int delete(String id) {
+        // TODO Auto-generated method stub
+        return billInfoDAO.delete(id);
+    }
+
+    @Override
+    public boolean exist(String id) {
+        // TODO Auto-generated method stub
+        int count = billInfoDAO.exist(id);
+
+        return count > 0 ? true : false;
+    }
+
+    @Override
+    public List<BillInfo> list() {
+        // TODO Auto-generated method stub
+        return billInfoDAO.list();
+    }
+
+    @Override
+    public Page<BillInfo> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize, boolean count, List<Sort> sortList) {
+        Page<BillInfo> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            billInfoDAO.search(searchParams,sortList);
+        });
+
+        return page;
+    }
+}

+ 115 - 0
common/src/main/resources/mapper/base/BillDetailInfo.xml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.enterprise.modules.base.dao.BillDetailInfoDAO">
+    <resultMap id="BillDetailInfoMap" type="com.jpsoft.enterprise.modules.base.entity.BillDetailInfo">
+        <id property="id" column="id_" />
+        <result property="billId" column="bill_id" />
+        <result property="orderId" column="order_id" />
+        <result property="companyId" column="company_id"/>
+        <result property="billDetail" column="bill_detail" />
+        <result property="rushStatus" column="rush_status"/>
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="delFlag" column="del_flag" />
+        <result property="sortNo" column="sort_no"/>
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.enterprise.modules.base.entity.BillDetailInfo">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into base_bill_detail_info
+	    (id_,bill_id,order_id,company_id,bill_detail,rush_status,create_by,create_time,update_by,update_time,del_flag,sort_no)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{billId,jdbcType=VARCHAR}
+,#{orderId,jdbcType=VARCHAR}
+,#{companyId,jdbcType=NUMERIC}
+,#{billDetail,jdbcType=VARCHAR}
+,#{rushStatus,jdbcType=VARCHAR}
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{delFlag,jdbcType= NUMERIC }
+,#{sortNo,jdbcType=INTEGER}
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from base_bill_detail_info where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.enterprise.modules.base.entity.BillDetailInfo">
+        update base_bill_detail_info
+        <set>
+            <if test="billId!=null">
+                bill_id=#{billId,jdbcType=VARCHAR},
+            </if>
+            <if test="orderId!=null">
+                order_id=#{orderId,jdbcType=VARCHAR},
+            </if>
+            <if test="companyId!=null">
+                company_id=#{companyId,jdbcType=VARCHAR},
+            </if>
+            <if test="billDetail!=null">
+                bill_detail=#{billDetail,jdbcType=VARCHAR},
+            </if>
+            <if test="rushStatus != null">
+                rush_status = #{rushStatus,jdbcType=VARCHAR},
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="sortNo != null">
+                sort_no = #{sortNo,jdbcType=INTEGER}
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="BillDetailInfoMap">
+        select * from base_bill_detail_info where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from base_bill_detail_info where id_=#{0}
+    </select>
+    <select id="list" resultMap="BillDetailInfoMap">
+		select * from base_bill_detail_info where del_flag = 0 order by create_time asc
+	</select>
+    <select id="search" parameterType="hashmap" resultMap="BillDetailInfoMap">
+        <![CDATA[
+			SELECT
+				*
+			FROM
+				base_bill_detail_info a
+		]]>
+        <where>
+            del_flag = 0
+            <if test="searchParams.id != null">
+                and ID_ like #{searchParams.id}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList"  open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+
+</mapper>

+ 105 - 0
common/src/main/resources/mapper/base/BillInfo.xml

@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.enterprise.modules.base.dao.BillInfoDAO">
+    <resultMap id="BillInfoMap" type="com.jpsoft.enterprise.modules.base.entity.BillInfo">
+        <id property="id" column="id_" />
+        <result property="billName" column="bill_name" />
+        <result property="billRemark" column="bill_remark" />
+        <result property="wxShow" column="wx_show"/>
+        <result property="status" column="status_" />
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="delFlag" column="del_flag" />
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.enterprise.modules.base.entity.BillInfo">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into base_bill_info
+	    (id_,bill_name,bill_remark,wx_show,status_,create_by,create_time,update_by,update_time,del_flag)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{billName,jdbcType=VARCHAR}
+,#{billRemark,jdbcType=VARCHAR}
+,#{wxShow,jdbcType=NUMERIC}
+,#{status,jdbcType=VARCHAR}
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{delFlag,jdbcType= NUMERIC }
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from base_bill_info where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.enterprise.modules.base.entity.BillInfo">
+        update base_bill_info
+        <set>
+            <if test="billName!=null">
+                bill_name=#{billName,jdbcType=VARCHAR},
+            </if>
+            <if test="billRemark!=null">
+                bill_remark=#{billRemark,jdbcType=VARCHAR},
+            </if>
+            <if test="wxShow!=null">
+                wx_show=#{wxShow,jdbcType=NUMERIC},
+            </if>
+            <if test="status!=null">
+                status_=#{status,jdbcType=VARCHAR},
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC }
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="BillInfoMap">
+        select * from base_bill_info where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from base_bill_info where id_=#{0}
+    </select>
+    <select id="list" resultMap="BillInfoMap">
+		select * from base_bill_info where del_flag = 0 order by create_time asc
+	</select>
+    <select id="search" parameterType="hashmap" resultMap="BillInfoMap">
+        <![CDATA[
+			SELECT
+				*
+			FROM
+				base_bill_info a
+		]]>
+        <where>
+            del_flag = 0
+            <if test="searchParams.id != null">
+                and ID_ like #{searchParams.id}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList"  open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+
+</mapper>

+ 17 - 0
web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/OrderInfoApiController.java

@@ -0,0 +1,17 @@
+package com.jpsoft.enterprise.modules.mobile.controller;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-2-22 15:21
+ */
+@RestController
+@RequestMapping("/mobile/orderInfoApi")
+@Slf4j
+public class OrderInfoApiController {
+
+
+}