java110 пре 5 година
родитељ
комит
487f2b67de
17 измењених фајлова са 941 додато и 10 уклоњено
  1. 104 0
      java110-bean/src/main/java/com/java110/dto/shopVipAccountDetail/ShopVipAccountDetailDto.java
  2. 81 0
      java110-bean/src/main/java/com/java110/po/shopVipAccountDetail/ShopVipAccountDetailPo.java
  3. 139 0
      java110-db/src/main/resources/mapper/acct/ShopVipAccountDetailServiceDaoImplMapper.xml
  4. 11 10
      java110-generator/src/main/resources/newBack/template_1.json
  5. 53 0
      java110-interface/src/main/java/com/java110/intf/acct/IShopVipAccountDetailInnerServiceSMO.java
  6. 94 0
      service-acct/src/main/java/com/java110/acct/api/ShopVipAccountApi.java
  7. 17 0
      service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/IDeleteShopVipAccountDetailBMO.java
  8. 16 0
      service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/IGetShopVipAccountDetailBMO.java
  9. 17 0
      service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/ISaveShopVipAccountDetailBMO.java
  10. 17 0
      service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/IUpdateShopVipAccountDetailBMO.java
  11. 34 0
      service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/impl/DeleteShopVipAccountDetailBMOImpl.java
  12. 44 0
      service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/impl/GetShopVipAccountDetailBMOImpl.java
  13. 38 0
      service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/impl/SaveShopVipAccountDetailBMOImpl.java
  14. 34 0
      service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/impl/UpdateShopVipAccountDetailBMOImpl.java
  15. 61 0
      service-acct/src/main/java/com/java110/acct/dao/IShopVipAccountDetailServiceDao.java
  16. 98 0
      service-acct/src/main/java/com/java110/acct/dao/impl/ShopVipAccountDetailServiceDaoImpl.java
  17. 83 0
      service-acct/src/main/java/com/java110/acct/smo/impl/ShopVipAccountDetailInnerServiceSMOImpl.java

+ 104 - 0
java110-bean/src/main/java/com/java110/dto/shopVipAccountDetail/ShopVipAccountDetailDto.java

@@ -0,0 +1,104 @@
+package com.java110.dto.shopVipAccountDetail;
+
+import com.java110.dto.PageDto;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @ClassName FloorDto
+ * @Description 会员账户交易数据层封装
+ * @Author wuxw
+ * @Date 2019/4/24 8:52
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+public class ShopVipAccountDetailDto extends PageDto implements Serializable {
+
+    private String detailType;
+private String amount;
+private String orderId;
+private String vipAcctId;
+private String detailId;
+private String relAcctId;
+private String remark;
+private String shopId;
+private String storeId;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getDetailType() {
+        return detailType;
+    }
+public void setDetailType(String detailType) {
+        this.detailType = detailType;
+    }
+public String getAmount() {
+        return amount;
+    }
+public void setAmount(String amount) {
+        this.amount = amount;
+    }
+public String getOrderId() {
+        return orderId;
+    }
+public void setOrderId(String orderId) {
+        this.orderId = orderId;
+    }
+public String getVipAcctId() {
+        return vipAcctId;
+    }
+public void setVipAcctId(String vipAcctId) {
+        this.vipAcctId = vipAcctId;
+    }
+public String getDetailId() {
+        return detailId;
+    }
+public void setDetailId(String detailId) {
+        this.detailId = detailId;
+    }
+public String getRelAcctId() {
+        return relAcctId;
+    }
+public void setRelAcctId(String relAcctId) {
+        this.relAcctId = relAcctId;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getShopId() {
+        return shopId;
+    }
+public void setShopId(String shopId) {
+        this.shopId = shopId;
+    }
+public String getStoreId() {
+        return storeId;
+    }
+public void setStoreId(String storeId) {
+        this.storeId = storeId;
+    }
+
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+}

+ 81 - 0
java110-bean/src/main/java/com/java110/po/shopVipAccountDetail/ShopVipAccountDetailPo.java

@@ -0,0 +1,81 @@
+package com.java110.po.shopVipAccountDetail;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ShopVipAccountDetailPo implements Serializable {
+
+    private String detailType;
+private String amount;
+private String orderId;
+private String vipAcctId;
+private String detailId;
+private String relAcctId;
+private String remark;
+private String statusCd = "0";
+private String shopId;
+private String storeId;
+public String getDetailType() {
+        return detailType;
+    }
+public void setDetailType(String detailType) {
+        this.detailType = detailType;
+    }
+public String getAmount() {
+        return amount;
+    }
+public void setAmount(String amount) {
+        this.amount = amount;
+    }
+public String getOrderId() {
+        return orderId;
+    }
+public void setOrderId(String orderId) {
+        this.orderId = orderId;
+    }
+public String getVipAcctId() {
+        return vipAcctId;
+    }
+public void setVipAcctId(String vipAcctId) {
+        this.vipAcctId = vipAcctId;
+    }
+public String getDetailId() {
+        return detailId;
+    }
+public void setDetailId(String detailId) {
+        this.detailId = detailId;
+    }
+public String getRelAcctId() {
+        return relAcctId;
+    }
+public void setRelAcctId(String relAcctId) {
+        this.relAcctId = relAcctId;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getShopId() {
+        return shopId;
+    }
+public void setShopId(String shopId) {
+        this.shopId = shopId;
+    }
+public String getStoreId() {
+        return storeId;
+    }
+public void setStoreId(String storeId) {
+        this.storeId = storeId;
+    }
+
+
+
+}

+ 139 - 0
java110-db/src/main/resources/mapper/acct/ShopVipAccountDetailServiceDaoImplMapper.xml

@@ -0,0 +1,139 @@
+<?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">
+<mapper namespace="shopVipAccountDetailServiceDaoImpl">
+
+
+    <!-- 保存会员账户交易信息 add by wuxw 2018-07-03 -->
+    <insert id="saveShopVipAccountDetailInfo" parameterType="Map">
+        insert into shop_vip_account_detail(
+        detail_type,amount,order_id,vip_acct_id,detail_id,rel_acct_id,remark,shop_id,store_id
+        ) values (
+        #{detailType},#{amount},#{orderId},#{vipAcctId},#{detailId},#{relAcctId},#{remark},#{shopId},#{storeId}
+        )
+    </insert>
+
+
+    <!-- 查询会员账户交易信息 add by wuxw 2018-07-03 -->
+    <select id="getShopVipAccountDetailInfo" parameterType="Map" resultType="Map">
+        select t.detail_type,t.detail_type detailType,t.amount,t.order_id,t.order_id orderId,t.vip_acct_id,t.vip_acct_id
+        vipAcctId,t.detail_id,t.detail_id detailId,t.rel_acct_id,t.rel_acct_id
+        relAcctId,t.remark,t.status_cd,t.status_cd statusCd,t.shop_id,t.shop_id shopId,t.store_id,t.store_id storeId
+        from shop_vip_account_detail t
+        where 1 =1
+        <if test="detailType !=null and detailType != ''">
+            and t.detail_type= #{detailType}
+        </if>
+        <if test="amount !=null and amount != ''">
+            and t.amount= #{amount}
+        </if>
+        <if test="orderId !=null and orderId != ''">
+            and t.order_id= #{orderId}
+        </if>
+        <if test="vipAcctId !=null and vipAcctId != ''">
+            and t.vip_acct_id= #{vipAcctId}
+        </if>
+        <if test="detailId !=null and detailId != ''">
+            and t.detail_id= #{detailId}
+        </if>
+        <if test="relAcctId !=null and relAcctId != ''">
+            and t.rel_acct_id= #{relAcctId}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            and t.shop_id= #{shopId}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            and t.store_id= #{storeId}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
+
+    </select>
+
+
+    <!-- 修改会员账户交易信息 add by wuxw 2018-07-03 -->
+    <update id="updateShopVipAccountDetailInfo" parameterType="Map">
+        update shop_vip_account_detail t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="detailType !=null and detailType != ''">
+            , t.detail_type= #{detailType}
+        </if>
+        <if test="amount !=null and amount != ''">
+            , t.amount= #{amount}
+        </if>
+        <if test="orderId !=null and orderId != ''">
+            , t.order_id= #{orderId}
+        </if>
+        <if test="vipAcctId !=null and vipAcctId != ''">
+            , t.vip_acct_id= #{vipAcctId}
+        </if>
+        <if test="relAcctId !=null and relAcctId != ''">
+            , t.rel_acct_id= #{relAcctId}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            , t.shop_id= #{shopId}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            , t.store_id= #{storeId}
+        </if>
+        where 1=1
+        <if test="detailId !=null and detailId != ''">
+            and t.detail_id= #{detailId}
+        </if>
+
+    </update>
+
+    <!-- 查询会员账户交易数量 add by wuxw 2018-07-03 -->
+    <select id="queryShopVipAccountDetailsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from shop_vip_account_detail t
+        where 1 =1
+        <if test="detailType !=null and detailType != ''">
+            and t.detail_type= #{detailType}
+        </if>
+        <if test="amount !=null and amount != ''">
+            and t.amount= #{amount}
+        </if>
+        <if test="orderId !=null and orderId != ''">
+            and t.order_id= #{orderId}
+        </if>
+        <if test="vipAcctId !=null and vipAcctId != ''">
+            and t.vip_acct_id= #{vipAcctId}
+        </if>
+        <if test="detailId !=null and detailId != ''">
+            and t.detail_id= #{detailId}
+        </if>
+        <if test="relAcctId !=null and relAcctId != ''">
+            and t.rel_acct_id= #{relAcctId}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            and t.shop_id= #{shopId}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            and t.store_id= #{storeId}
+        </if>
+
+
+    </select>
+
+</mapper>

+ 11 - 10
java110-generator/src/main/resources/newBack/template_1.json

@@ -1,25 +1,27 @@
 {
   "autoMove": true,
-  "id": "vipAcctId",
-  "name": "shopVipAccount",
-  "desc": "会员账户",
+  "id": "detailId",
+  "name": "shopVipAccountDetail",
+  "desc": "会员账户交易",
   "shareParam": "shopId",
   "shareColumn": "shop_id",
   "shareName": "acct",
-  "tableName": "shop_vip_account",
+  "tableName": "shop_vip_account_detail",
   "param": {
+    "detailId": "detail_id",
     "vipAcctId": "vip_acct_id",
-    "vipId": "vip_id",
-    "acctName": "acct_name",
-    "acctType": "acct_type",
+    "detailType": "detail_type",
+    "relAcctId": "rel_acct_id",
     "amount": "amount",
     "shopId": "shop_id",
     "storeId": "store_id",
+    "orderId": "order_id",
+    "remark": "remark",
     "statusCd": "status_cd"
   },
   "required": [
     {
-      "code": "vipId",
+      "code": "vipAcctId",
       "msg": "会员不能为空"
     },
     {
@@ -27,5 +29,4 @@
       "msg": "金额不能为空"
     }
   ]
-}
-
+}

+ 53 - 0
java110-interface/src/main/java/com/java110/intf/acct/IShopVipAccountDetailInnerServiceSMO.java

@@ -0,0 +1,53 @@
+package com.java110.intf.acct;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.shopVipAccountDetail.ShopVipAccountDetailDto;
+import com.java110.po.shopVipAccountDetail.ShopVipAccountDetailPo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * @ClassName IShopVipAccountDetailInnerServiceSMO
+ * @Description 会员账户交易接口类
+ * @Author wuxw
+ * @Date 2019/4/24 9:04
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+@FeignClient(name = "acct-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/shopVipAccountDetailApi")
+public interface IShopVipAccountDetailInnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveShopVipAccountDetail", method = RequestMethod.POST)
+    public int saveShopVipAccountDetail(@RequestBody ShopVipAccountDetailPo shopVipAccountDetailPo);
+
+    @RequestMapping(value = "/updateShopVipAccountDetail", method = RequestMethod.POST)
+    public int updateShopVipAccountDetail(@RequestBody  ShopVipAccountDetailPo shopVipAccountDetailPo);
+
+    @RequestMapping(value = "/deleteShopVipAccountDetail", method = RequestMethod.POST)
+    public int deleteShopVipAccountDetail(@RequestBody  ShopVipAccountDetailPo shopVipAccountDetailPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param shopVipAccountDetailDto 数据对象分享
+     * @return ShopVipAccountDetailDto 对象数据
+     */
+    @RequestMapping(value = "/queryShopVipAccountDetails", method = RequestMethod.POST)
+    List<ShopVipAccountDetailDto> queryShopVipAccountDetails(@RequestBody ShopVipAccountDetailDto shopVipAccountDetailDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param shopVipAccountDetailDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryShopVipAccountDetailsCount", method = RequestMethod.POST)
+    int queryShopVipAccountDetailsCount(@RequestBody ShopVipAccountDetailDto shopVipAccountDetailDto);
+}

+ 94 - 0
service-acct/src/main/java/com/java110/acct/api/ShopVipAccountApi.java

@@ -5,8 +5,14 @@ import com.java110.acct.bmo.shopVipAccount.IDeleteShopVipAccountBMO;
 import com.java110.acct.bmo.shopVipAccount.IGetShopVipAccountBMO;
 import com.java110.acct.bmo.shopVipAccount.ISaveShopVipAccountBMO;
 import com.java110.acct.bmo.shopVipAccount.IUpdateShopVipAccountBMO;
+import com.java110.acct.bmo.shopVipAccountDetail.IDeleteShopVipAccountDetailBMO;
+import com.java110.acct.bmo.shopVipAccountDetail.IGetShopVipAccountDetailBMO;
+import com.java110.acct.bmo.shopVipAccountDetail.ISaveShopVipAccountDetailBMO;
+import com.java110.acct.bmo.shopVipAccountDetail.IUpdateShopVipAccountDetailBMO;
 import com.java110.dto.shopVipAccount.ShopVipAccountDto;
+import com.java110.dto.shopVipAccountDetail.ShopVipAccountDetailDto;
 import com.java110.po.shopVipAccount.ShopVipAccountPo;
+import com.java110.po.shopVipAccountDetail.ShopVipAccountDetailPo;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -28,6 +34,16 @@ public class ShopVipAccountApi {
     @Autowired
     private IGetShopVipAccountBMO getShopVipAccountBMOImpl;
 
+    @Autowired
+    private ISaveShopVipAccountDetailBMO saveShopVipAccountDetailBMOImpl;
+    @Autowired
+    private IUpdateShopVipAccountDetailBMO updateShopVipAccountDetailBMOImpl;
+    @Autowired
+    private IDeleteShopVipAccountDetailBMO deleteShopVipAccountDetailBMOImpl;
+
+    @Autowired
+    private IGetShopVipAccountDetailBMO getShopVipAccountDetailBMOImpl;
+
     /**
      * 微信保存消息模板
      *
@@ -104,4 +120,82 @@ public class ShopVipAccountApi {
         shopVipAccountDto.setShopId(shopId);
         return getShopVipAccountBMOImpl.get(shopVipAccountDto);
     }
+
+
+    /**
+     * 微信保存消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /shopVipAccount/saveShopVipAccountDetail
+     * @path /app/shopVipAccount/saveShopVipAccountDetail
+     */
+    @RequestMapping(value = "/saveShopVipAccountDetail", method = RequestMethod.POST)
+    public ResponseEntity<String> saveShopVipAccountDetail(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "vipAcctId", "请求报文中未包含vipAcctId");
+        Assert.hasKeyAndValue(reqJson, "amount", "请求报文中未包含amount");
+
+
+        ShopVipAccountDetailPo shopVipAccountDetailPo = BeanConvertUtil.covertBean(reqJson, ShopVipAccountDetailPo.class);
+        return saveShopVipAccountDetailBMOImpl.save(shopVipAccountDetailPo);
+    }
+
+    /**
+     * 微信修改消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /shopVipAccount/updateShopVipAccountDetail
+     * @path /app/shopVipAccount/updateShopVipAccountDetail
+     */
+    @RequestMapping(value = "/updateShopVipAccountDetail", method = RequestMethod.POST)
+    public ResponseEntity<String> updateShopVipAccountDetail(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "vipAcctId", "请求报文中未包含vipAcctId");
+        Assert.hasKeyAndValue(reqJson, "amount", "请求报文中未包含amount");
+        Assert.hasKeyAndValue(reqJson, "detailId", "detailId不能为空");
+
+
+        ShopVipAccountDetailPo shopVipAccountDetailPo = BeanConvertUtil.covertBean(reqJson, ShopVipAccountDetailPo.class);
+        return updateShopVipAccountDetailBMOImpl.update(shopVipAccountDetailPo);
+    }
+
+    /**
+     * 微信删除消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /shopVipAccount/deleteShopVipAccountDetail
+     * @path /app/shopVipAccount/deleteShopVipAccountDetail
+     */
+    @RequestMapping(value = "/deleteShopVipAccountDetail", method = RequestMethod.POST)
+    public ResponseEntity<String> deleteShopVipAccountDetail(@RequestBody JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
+
+        Assert.hasKeyAndValue(reqJson, "detailId", "detailId不能为空");
+
+
+        ShopVipAccountDetailPo shopVipAccountDetailPo = BeanConvertUtil.covertBean(reqJson, ShopVipAccountDetailPo.class);
+        return deleteShopVipAccountDetailBMOImpl.delete(shopVipAccountDetailPo);
+    }
+
+    /**
+     * 微信删除消息模板
+     *
+     * @param shopId 小区ID
+     * @return
+     * @serviceCode /shopVipAccount/queryShopVipAccountDetail
+     * @path /app/shopVipAccount/queryShopVipAccountDetail
+     */
+    @RequestMapping(value = "/queryShopVipAccountDetail", method = RequestMethod.GET)
+    public ResponseEntity<String> queryShopVipAccountDetail(@RequestParam(value = "shopId", required = false) String shopId,
+                                                            @RequestParam(value = "page") int page,
+                                                            @RequestParam(value = "row") int row) {
+        ShopVipAccountDetailDto shopVipAccountDetailDto = new ShopVipAccountDetailDto();
+        shopVipAccountDetailDto.setPage(page);
+        shopVipAccountDetailDto.setRow(row);
+        shopVipAccountDetailDto.setShopId(shopId);
+        return getShopVipAccountDetailBMOImpl.get(shopVipAccountDetailDto);
+    }
 }

+ 17 - 0
service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/IDeleteShopVipAccountDetailBMO.java

@@ -0,0 +1,17 @@
+package com.java110.acct.bmo.shopVipAccountDetail;
+import com.java110.po.shopVipAccountDetail.ShopVipAccountDetailPo;
+import org.springframework.http.ResponseEntity;
+
+public interface IDeleteShopVipAccountDetailBMO {
+
+
+    /**
+     * 修改会员账户交易
+     * add by wuxw
+     * @param shopVipAccountDetailPo
+     * @return
+     */
+    ResponseEntity<String> delete(ShopVipAccountDetailPo shopVipAccountDetailPo);
+
+
+}

+ 16 - 0
service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/IGetShopVipAccountDetailBMO.java

@@ -0,0 +1,16 @@
+package com.java110.acct.bmo.shopVipAccountDetail;
+import com.java110.dto.shopVipAccountDetail.ShopVipAccountDetailDto;
+import org.springframework.http.ResponseEntity;
+public interface IGetShopVipAccountDetailBMO {
+
+
+    /**
+     * 查询会员账户交易
+     * add by wuxw
+     * @param  shopVipAccountDetailDto
+     * @return
+     */
+    ResponseEntity<String> get(ShopVipAccountDetailDto shopVipAccountDetailDto);
+
+
+}

+ 17 - 0
service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/ISaveShopVipAccountDetailBMO.java

@@ -0,0 +1,17 @@
+package com.java110.acct.bmo.shopVipAccountDetail;
+
+import com.java110.po.shopVipAccountDetail.ShopVipAccountDetailPo;
+import org.springframework.http.ResponseEntity;
+public interface ISaveShopVipAccountDetailBMO {
+
+
+    /**
+     * 添加会员账户交易
+     * add by wuxw
+     * @param shopVipAccountDetailPo
+     * @return
+     */
+    ResponseEntity<String> save(ShopVipAccountDetailPo shopVipAccountDetailPo);
+
+
+}

+ 17 - 0
service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/IUpdateShopVipAccountDetailBMO.java

@@ -0,0 +1,17 @@
+package com.java110.acct.bmo.shopVipAccountDetail;
+import com.java110.po.shopVipAccountDetail.ShopVipAccountDetailPo;
+import org.springframework.http.ResponseEntity;
+
+public interface IUpdateShopVipAccountDetailBMO {
+
+
+    /**
+     * 修改会员账户交易
+     * add by wuxw
+     * @param shopVipAccountDetailPo
+     * @return
+     */
+    ResponseEntity<String> update(ShopVipAccountDetailPo shopVipAccountDetailPo);
+
+
+}

+ 34 - 0
service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/impl/DeleteShopVipAccountDetailBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.acct.bmo.shopVipAccountDetail.impl;
+
+import com.java110.acct.bmo.shopVipAccountDetail.IDeleteShopVipAccountDetailBMO;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.intf.acct.IShopVipAccountDetailInnerServiceSMO;
+import com.java110.po.shopVipAccountDetail.ShopVipAccountDetailPo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("deleteShopVipAccountDetailBMOImpl")
+public class DeleteShopVipAccountDetailBMOImpl implements IDeleteShopVipAccountDetailBMO {
+
+    @Autowired
+    private IShopVipAccountDetailInnerServiceSMO shopVipAccountDetailInnerServiceSMOImpl;
+
+    /**
+     * @param shopVipAccountDetailPo 数据
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> delete(ShopVipAccountDetailPo shopVipAccountDetailPo) {
+
+        int flag = shopVipAccountDetailInnerServiceSMOImpl.deleteShopVipAccountDetail(shopVipAccountDetailPo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 44 - 0
service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/impl/GetShopVipAccountDetailBMOImpl.java

@@ -0,0 +1,44 @@
+package com.java110.acct.bmo.shopVipAccountDetail.impl;
+
+import com.java110.acct.bmo.shopVipAccountDetail.IGetShopVipAccountDetailBMO;
+import com.java110.dto.shopVipAccountDetail.ShopVipAccountDetailDto;
+import com.java110.intf.acct.IShopVipAccountDetailInnerServiceSMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service("getShopVipAccountDetailBMOImpl")
+public class GetShopVipAccountDetailBMOImpl implements IGetShopVipAccountDetailBMO {
+
+    @Autowired
+    private IShopVipAccountDetailInnerServiceSMO shopVipAccountDetailInnerServiceSMOImpl;
+
+    /**
+     * @param shopVipAccountDetailDto
+     * @return 订单服务能够接受的报文
+     */
+    public ResponseEntity<String> get(ShopVipAccountDetailDto shopVipAccountDetailDto) {
+
+
+        int count = shopVipAccountDetailInnerServiceSMOImpl.queryShopVipAccountDetailsCount(shopVipAccountDetailDto);
+
+        List<ShopVipAccountDetailDto> shopVipAccountDetailDtos = null;
+        if (count > 0) {
+            shopVipAccountDetailDtos = shopVipAccountDetailInnerServiceSMOImpl.queryShopVipAccountDetails(shopVipAccountDetailDto);
+        } else {
+            shopVipAccountDetailDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) shopVipAccountDetailDto.getRow()), count, shopVipAccountDetailDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        return responseEntity;
+    }
+
+}

+ 38 - 0
service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/impl/SaveShopVipAccountDetailBMOImpl.java

@@ -0,0 +1,38 @@
+package com.java110.acct.bmo.shopVipAccountDetail.impl;
+
+import com.java110.acct.bmo.shopVipAccountDetail.ISaveShopVipAccountDetailBMO;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.acct.IShopVipAccountDetailInnerServiceSMO;
+import com.java110.po.shopVipAccountDetail.ShopVipAccountDetailPo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("saveShopVipAccountDetailBMOImpl")
+public class SaveShopVipAccountDetailBMOImpl implements ISaveShopVipAccountDetailBMO {
+
+    @Autowired
+    private IShopVipAccountDetailInnerServiceSMO shopVipAccountDetailInnerServiceSMOImpl;
+
+    /**
+     * 添加小区信息
+     *
+     * @param shopVipAccountDetailPo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> save(ShopVipAccountDetailPo shopVipAccountDetailPo) {
+
+        shopVipAccountDetailPo.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId));
+        int flag = shopVipAccountDetailInnerServiceSMOImpl.saveShopVipAccountDetail(shopVipAccountDetailPo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 34 - 0
service-acct/src/main/java/com/java110/acct/bmo/shopVipAccountDetail/impl/UpdateShopVipAccountDetailBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.acct.bmo.shopVipAccountDetail.impl;
+
+import com.java110.acct.bmo.shopVipAccountDetail.IUpdateShopVipAccountDetailBMO;
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.intf.acct.IShopVipAccountDetailInnerServiceSMO;
+import com.java110.po.shopVipAccountDetail.ShopVipAccountDetailPo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("updateShopVipAccountDetailBMOImpl")
+public class UpdateShopVipAccountDetailBMOImpl implements IUpdateShopVipAccountDetailBMO {
+
+    @Autowired
+    private IShopVipAccountDetailInnerServiceSMO shopVipAccountDetailInnerServiceSMOImpl;
+
+    /**
+     * @param shopVipAccountDetailPo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> update(ShopVipAccountDetailPo shopVipAccountDetailPo) {
+
+        int flag = shopVipAccountDetailInnerServiceSMOImpl.updateShopVipAccountDetail(shopVipAccountDetailPo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 61 - 0
service-acct/src/main/java/com/java110/acct/dao/IShopVipAccountDetailServiceDao.java

@@ -0,0 +1,61 @@
+package com.java110.acct.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 会员账户交易组件内部之间使用,没有给外围系统提供服务能力
+ * 会员账户交易服务接口类,要求全部以字符串传输,方便微服务化
+ * 新建客户,修改客户,删除客户,查询客户等功能
+ *
+ * Created by wuxw on 2016/12/27.
+ */
+public interface IShopVipAccountDetailServiceDao {
+
+
+    /**
+     * 保存 会员账户交易信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    void saveShopVipAccountDetailInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询会员账户交易信息(instance过程)
+     * 根据bId 查询会员账户交易信息
+     * @param info bId 信息
+     * @return 会员账户交易信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getShopVipAccountDetailInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改会员账户交易信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    void updateShopVipAccountDetailInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询会员账户交易总数
+     *
+     * @param info 会员账户交易信息
+     * @return 会员账户交易数量
+     */
+    int queryShopVipAccountDetailsCount(Map info);
+
+}

+ 98 - 0
service-acct/src/main/java/com/java110/acct/dao/impl/ShopVipAccountDetailServiceDaoImpl.java

@@ -0,0 +1,98 @@
+package com.java110.acct.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.acct.dao.IShopVipAccountDetailServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 会员账户交易服务 与数据库交互
+ * Created by wuxw on 2017/4/5.
+ */
+@Service("shopVipAccountDetailServiceDaoImpl")
+//@Transactional
+public class ShopVipAccountDetailServiceDaoImpl extends BaseServiceDao implements IShopVipAccountDetailServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ShopVipAccountDetailServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存会员账户交易信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void saveShopVipAccountDetailInfo(Map info) throws DAOException {
+        logger.debug("保存会员账户交易信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("shopVipAccountDetailServiceDaoImpl.saveShopVipAccountDetailInfo",info);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存会员账户交易信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        }
+    }
+
+
+    /**
+     * 查询会员账户交易信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getShopVipAccountDetailInfo(Map info) throws DAOException {
+        logger.debug("查询会员账户交易信息 入参 info : {}",info);
+
+        List<Map> businessShopVipAccountDetailInfos = sqlSessionTemplate.selectList("shopVipAccountDetailServiceDaoImpl.getShopVipAccountDetailInfo",info);
+
+        return businessShopVipAccountDetailInfos;
+    }
+
+
+    /**
+     * 修改会员账户交易信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void updateShopVipAccountDetailInfo(Map info) throws DAOException {
+        logger.debug("修改会员账户交易信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("shopVipAccountDetailServiceDaoImpl.updateShopVipAccountDetailInfo",info);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改会员账户交易信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        }
+    }
+
+     /**
+     * 查询会员账户交易数量
+     * @param info 会员账户交易信息
+     * @return 会员账户交易数量
+     */
+    @Override
+    public int queryShopVipAccountDetailsCount(Map info) {
+        logger.debug("查询会员账户交易数据 入参 info : {}",info);
+
+        List<Map> businessShopVipAccountDetailInfos = sqlSessionTemplate.selectList("shopVipAccountDetailServiceDaoImpl.queryShopVipAccountDetailsCount", info);
+        if (businessShopVipAccountDetailInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessShopVipAccountDetailInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 83 - 0
service-acct/src/main/java/com/java110/acct/smo/impl/ShopVipAccountDetailInnerServiceSMOImpl.java

@@ -0,0 +1,83 @@
+package com.java110.acct.smo.impl;
+
+
+import com.java110.acct.dao.IShopVipAccountDetailServiceDao;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.PageDto;
+import com.java110.dto.shopVipAccountDetail.ShopVipAccountDetailDto;
+import com.java110.intf.acct.IShopVipAccountDetailInnerServiceSMO;
+import com.java110.po.shopVipAccountDetail.ShopVipAccountDetailPo;
+import com.java110.utils.util.BeanConvertUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @ClassName FloorInnerServiceSMOImpl
+ * @Description 会员账户交易内部服务实现类
+ * @Author wuxw
+ * @Date 2019/4/24 9:20
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+@RestController
+public class ShopVipAccountDetailInnerServiceSMOImpl extends BaseServiceSMO implements IShopVipAccountDetailInnerServiceSMO {
+
+    @Autowired
+    private IShopVipAccountDetailServiceDao shopVipAccountDetailServiceDaoImpl;
+
+
+    @Override
+    public int saveShopVipAccountDetail(@RequestBody ShopVipAccountDetailPo shopVipAccountDetailPo) {
+        int saveFlag = 1;
+        shopVipAccountDetailServiceDaoImpl.saveShopVipAccountDetailInfo(BeanConvertUtil.beanCovertMap(shopVipAccountDetailPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int updateShopVipAccountDetail(@RequestBody ShopVipAccountDetailPo shopVipAccountDetailPo) {
+        int saveFlag = 1;
+        shopVipAccountDetailServiceDaoImpl.updateShopVipAccountDetailInfo(BeanConvertUtil.beanCovertMap(shopVipAccountDetailPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int deleteShopVipAccountDetail(@RequestBody ShopVipAccountDetailPo shopVipAccountDetailPo) {
+        int saveFlag = 1;
+        shopVipAccountDetailPo.setStatusCd("1");
+        shopVipAccountDetailServiceDaoImpl.updateShopVipAccountDetailInfo(BeanConvertUtil.beanCovertMap(shopVipAccountDetailPo));
+        return saveFlag;
+    }
+
+    @Override
+    public List<ShopVipAccountDetailDto> queryShopVipAccountDetails(@RequestBody ShopVipAccountDetailDto shopVipAccountDetailDto) {
+
+        //校验是否传了 分页信息
+
+        int page = shopVipAccountDetailDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            shopVipAccountDetailDto.setPage((page - 1) * shopVipAccountDetailDto.getRow());
+        }
+
+        List<ShopVipAccountDetailDto> shopVipAccountDetails = BeanConvertUtil.covertBeanList(shopVipAccountDetailServiceDaoImpl.getShopVipAccountDetailInfo(BeanConvertUtil.beanCovertMap(shopVipAccountDetailDto)), ShopVipAccountDetailDto.class);
+
+        return shopVipAccountDetails;
+    }
+
+
+    @Override
+    public int queryShopVipAccountDetailsCount(@RequestBody ShopVipAccountDetailDto shopVipAccountDetailDto) {
+        return shopVipAccountDetailServiceDaoImpl.queryShopVipAccountDetailsCount(BeanConvertUtil.beanCovertMap(shopVipAccountDetailDto));
+    }
+
+    public IShopVipAccountDetailServiceDao getShopVipAccountDetailServiceDaoImpl() {
+        return shopVipAccountDetailServiceDaoImpl;
+    }
+
+    public void setShopVipAccountDetailServiceDaoImpl(IShopVipAccountDetailServiceDao shopVipAccountDetailServiceDaoImpl) {
+        this.shopVipAccountDetailServiceDaoImpl = shopVipAccountDetailServiceDaoImpl;
+    }
+}