From ca50a331996e533b58dc6c111cfdd71116e09067 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Wed, 26 Jun 2024 15:05:14 +0800 Subject: [PATCH] Changes --- .../controller/recharge/PriceController.java | 21 ++---- .../com/cweb/controller/CommonController.java | 62 ++++++++++++++--- .../controller/qianZhu/CinemaController.java | 67 +++++++++++++++++++ .../com/hfkj/dao/RechargePriceMapper.java | 17 ++--- .../hfkj/dao/RechargePriceSqlProvider.java | 14 ---- .../java/com/hfkj/entity/RechargePrice.java | 16 ----- .../com/hfkj/entity/RechargePriceExample.java | 60 ----------------- .../hfkj/qianzhu/channel/CinemaService.java | 41 +++++++++++- .../hfkj/qianzhu/channel/QianZhuService.java | 3 +- .../service/recharge/RechargeCodeService.java | 63 +++++++++++++++++ .../impl/RechargeCodeServiceImpl.java | 43 ++++++++++++ 11 files changed, 281 insertions(+), 126 deletions(-) create mode 100644 service/src/main/java/com/hfkj/service/recharge/RechargeCodeService.java create mode 100644 service/src/main/java/com/hfkj/service/recharge/impl/RechargeCodeServiceImpl.java diff --git a/bweb/src/main/java/com/bweb/controller/recharge/PriceController.java b/bweb/src/main/java/com/bweb/controller/recharge/PriceController.java index 2191319..64ff28a 100644 --- a/bweb/src/main/java/com/bweb/controller/recharge/PriceController.java +++ b/bweb/src/main/java/com/bweb/controller/recharge/PriceController.java @@ -1,31 +1,23 @@ package com.bweb.controller.recharge; -import com.alibaba.fastjson.JSONObject; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; -import com.hfkj.common.security.SessionObject; import com.hfkj.common.utils.ResponseMsgUtil; -import com.hfkj.entity.GoodsBrand; -import com.hfkj.entity.GoodsType; + import com.hfkj.entity.RechargePrice; import com.hfkj.model.ResponseData; -import com.hfkj.model.SecUserSessionObject; import com.hfkj.service.recharge.PriceService; -import com.hfkj.sysenum.SecUserObjectTypeEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import java.math.BigDecimal; import java.util.Date; import java.util.HashMap; import java.util.Map; @@ -40,10 +32,10 @@ public class PriceController { @Resource private PriceService priceService; - @RequestMapping(value="/getListGoods",method = RequestMethod.GET) + @RequestMapping(value="/getListPrice",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询列表") - public ResponseData getListGoods( + public ResponseData getListPrice( @RequestParam(value = "type" , required = false) Integer type, @RequestParam(value = "pageNum" , required = true) Integer pageNum, @RequestParam(value = "pageSize" , required = true) Integer pageSize) { @@ -67,10 +59,9 @@ public class PriceController { public ResponseData editPrice(@RequestBody RechargePrice body) { try { - if (body == null || body.getPrice() == null - || body.getDiscount() == null + || body.getPayPrice() == null || body.getSort() == null || body.getType() == null ) { @@ -91,9 +82,8 @@ public class PriceController { } rechargePrice.setUpdateTime(new Date()); - rechargePrice.setPayPrice(body.getPrice().multiply(body.getDiscount()).divide(new BigDecimal(100)).setScale(2 , BigDecimal.ROUND_HALF_UP)); + rechargePrice.setPayPrice(body.getPayPrice()); rechargePrice.setPrice(body.getPrice()); - rechargePrice.setDiscount(body.getDiscount()); rechargePrice.setType(body.getType()); rechargePrice.setSort(body.getSort()); rechargePrice.setStatus(1); @@ -110,6 +100,7 @@ public class PriceController { log.error("OutRechargePriceController --> insertPrice() error!", e); return ResponseMsgUtil.exception(e); } + } @RequestMapping(value="/delete",method = RequestMethod.GET) diff --git a/cweb/src/main/java/com/cweb/controller/CommonController.java b/cweb/src/main/java/com/cweb/controller/CommonController.java index b406d83..8e0531d 100644 --- a/cweb/src/main/java/com/cweb/controller/CommonController.java +++ b/cweb/src/main/java/com/cweb/controller/CommonController.java @@ -21,9 +21,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; @RestController @RequestMapping(value="/common") @@ -37,6 +36,7 @@ public class CommonController { @Autowired private RedisUtil redisUtil; + @Resource private BsOrderGoodsService bsOrderGoodsService; @@ -86,10 +86,10 @@ public class CommonController { } } - @RequestMapping(value = "/getAllCities", method = RequestMethod.GET) + @RequestMapping(value = "/getAllQzCities", method = RequestMethod.GET) @ResponseBody - @ApiOperation(value = "查询中国大陆所有城市") - public ResponseData getAllCities() { + @ApiOperation(value = "查询千猪中国大陆所有城市") + public ResponseData getAllQzCities() { try { Object data = redisUtil.get("qianZhuCity"); @@ -97,9 +97,21 @@ public class CommonController { if (data == null) { JSONObject jsonObjects = QianZhuService.getAllCities(); - redisUtil.set("qianZhuCity", jsonObjects); - return ResponseMsgUtil.success(jsonObjects); + JSONArray array = jsonObjects.getJSONArray("data"); + List list = new ArrayList<>(); + + for (Object obj : array) { + list.add((JSONObject) obj); + } + List objectList = list.stream() + .filter(n -> n.getInteger("cityId") != null) + .collect(Collectors.toList()); + + + redisUtil.set("qianZhuCity", objectList , 60*60*6); + + return ResponseMsgUtil.success(objectList); } else { return ResponseMsgUtil.success(data); @@ -111,6 +123,40 @@ public class CommonController { } } + + @RequestMapping(value = "/locateByLngAndLat", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "根据经纬度定位城市") + public ResponseData locateByLngAndLat(@RequestParam(name = "lng", required = true) String lng, @RequestParam(name = "lat", required = true) String lat) { + try { + + String cityName = "重庆市"; + + ResponseData data = getAllQzCities(); + + if (Objects.equals(data.getReturn_code(), "000000")) { + List array = (List) data.getReturn_data(); + + for (JSONObject s : array) { + if (Objects.equals(s.getString("cityName"), cityName)) { + return ResponseMsgUtil.success(s); + } + } + + return ResponseMsgUtil.success("未查询到任何内容!"); + + + } else { + return ResponseMsgUtil.success(data.getReturn_msg()); + } + + + } catch (Exception e) { + log.error("HighUserCardController --> oilCardRefund() error!", e); + return ResponseMsgUtil.exception(e); + } + } + @RequestMapping(value = "/listByCityId", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询城市区域") diff --git a/cweb/src/main/java/com/cweb/controller/qianZhu/CinemaController.java b/cweb/src/main/java/com/cweb/controller/qianZhu/CinemaController.java index 2b1b01a..6318821 100644 --- a/cweb/src/main/java/com/cweb/controller/qianZhu/CinemaController.java +++ b/cweb/src/main/java/com/cweb/controller/qianZhu/CinemaController.java @@ -182,4 +182,71 @@ public class CinemaController { return ResponseMsgUtil.exception(e); } } + + @RequestMapping(value="/pagedQuery",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "分页查询场次") + public ResponseData pagedQuery( + @RequestParam(name = "cityId", required = false) Integer cityId, + @RequestParam(name = "cityCode", required = false) String cityCode, + @RequestParam(name = "cinemaId", required = false) Integer cinemaId, + @RequestParam(name = "filmId", required = false) Integer filmId, + @RequestParam(value = "showTimeBeginTime" , required = false) Long showTimeBeginTime, + @RequestParam(value = "showTimeEndTime" , required = false) Long showTimeEndTime, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize + ) { + try { + + Map params = new HashMap<>(); + + if (cityId != null) { + params.put("cityId", cityId); + } + if (cityCode != null) { + params.put("cityCode", cityCode); + } + if (cinemaId != null) { + params.put("cinemaId", cinemaId); + } + if (filmId != null) { + params.put("filmId", filmId); + } + if (showTimeBeginTime != null) { + params.put("showTimeBeginTime", showTimeBeginTime); + } + if (showTimeEndTime != null) { + params.put("showTimeEndTime", showTimeEndTime); + } + + params.put("pageIndex", pageNum); + params.put("pageSize", pageSize); + + return ResponseMsgUtil.success(CinemaService.pagedQuery(params)); + + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } + + + @RequestMapping(value="/getRealTimeSeatByShowId",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询场次实时座位") + public ResponseData getRealTimeSeatByShowId( + @RequestParam(name = "showId", required = true) Long showId + ) { + try { + + Map params = new HashMap<>(); + params.put("showId", showId); + + return ResponseMsgUtil.success(CinemaService.getRealTimeSeatByShowId(params)); + + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } } diff --git a/service/src/main/java/com/hfkj/dao/RechargePriceMapper.java b/service/src/main/java/com/hfkj/dao/RechargePriceMapper.java index 61b4768..e85697e 100644 --- a/service/src/main/java/com/hfkj/dao/RechargePriceMapper.java +++ b/service/src/main/java/com/hfkj/dao/RechargePriceMapper.java @@ -39,13 +39,13 @@ public interface RechargePriceMapper extends RechargePriceMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into recharge_price (discount, `type`, ", - "sort, price, pay_price, ", + "insert into recharge_price (`type`, sort, ", + "price, pay_price, ", "create_time, update_time, ", "`status`, ext_1, ext_2, ", "ext_3)", - "values (#{discount,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER}, ", - "#{sort,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{payPrice,jdbcType=DECIMAL}, ", + "values (#{type,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, ", + "#{price,jdbcType=DECIMAL}, #{payPrice,jdbcType=DECIMAL}, ", "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", "#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", "#{ext3,jdbcType=VARCHAR})" @@ -60,7 +60,6 @@ public interface RechargePriceMapper extends RechargePriceMapperExt { @SelectProvider(type=RechargePriceSqlProvider.class, method="selectByExample") @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), - @Result(column="discount", property="discount", jdbcType=JdbcType.DECIMAL), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), @@ -76,14 +75,13 @@ public interface RechargePriceMapper extends RechargePriceMapperExt { @Select({ "select", - "id, discount, `type`, sort, price, pay_price, create_time, update_time, `status`, ", - "ext_1, ext_2, ext_3", + "id, `type`, sort, price, pay_price, create_time, update_time, `status`, ext_1, ", + "ext_2, ext_3", "from recharge_price", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), - @Result(column="discount", property="discount", jdbcType=JdbcType.DECIMAL), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), @@ -108,8 +106,7 @@ public interface RechargePriceMapper extends RechargePriceMapperExt { @Update({ "update recharge_price", - "set discount = #{discount,jdbcType=DECIMAL},", - "`type` = #{type,jdbcType=INTEGER},", + "set `type` = #{type,jdbcType=INTEGER},", "sort = #{sort,jdbcType=INTEGER},", "price = #{price,jdbcType=DECIMAL},", "pay_price = #{payPrice,jdbcType=DECIMAL},", diff --git a/service/src/main/java/com/hfkj/dao/RechargePriceSqlProvider.java b/service/src/main/java/com/hfkj/dao/RechargePriceSqlProvider.java index 2868b77..b42717d 100644 --- a/service/src/main/java/com/hfkj/dao/RechargePriceSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/RechargePriceSqlProvider.java @@ -28,10 +28,6 @@ public class RechargePriceSqlProvider { SQL sql = new SQL(); sql.INSERT_INTO("recharge_price"); - if (record.getDiscount() != null) { - sql.VALUES("discount", "#{discount,jdbcType=DECIMAL}"); - } - if (record.getType() != null) { sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); } @@ -82,7 +78,6 @@ public class RechargePriceSqlProvider { } else { sql.SELECT("id"); } - sql.SELECT("discount"); sql.SELECT("`type`"); sql.SELECT("sort"); sql.SELECT("price"); @@ -114,10 +109,6 @@ public class RechargePriceSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); } - if (record.getDiscount() != null) { - sql.SET("discount = #{record.discount,jdbcType=DECIMAL}"); - } - if (record.getType() != null) { sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); } @@ -167,7 +158,6 @@ public class RechargePriceSqlProvider { sql.UPDATE("recharge_price"); sql.SET("id = #{record.id,jdbcType=BIGINT}"); - sql.SET("discount = #{record.discount,jdbcType=DECIMAL}"); sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); sql.SET("sort = #{record.sort,jdbcType=INTEGER}"); sql.SET("price = #{record.price,jdbcType=DECIMAL}"); @@ -188,10 +178,6 @@ public class RechargePriceSqlProvider { SQL sql = new SQL(); sql.UPDATE("recharge_price"); - if (record.getDiscount() != null) { - sql.SET("discount = #{discount,jdbcType=DECIMAL}"); - } - if (record.getType() != null) { sql.SET("`type` = #{type,jdbcType=INTEGER}"); } diff --git a/service/src/main/java/com/hfkj/entity/RechargePrice.java b/service/src/main/java/com/hfkj/entity/RechargePrice.java index 694f67a..9c7fed7 100644 --- a/service/src/main/java/com/hfkj/entity/RechargePrice.java +++ b/service/src/main/java/com/hfkj/entity/RechargePrice.java @@ -19,11 +19,6 @@ public class RechargePrice implements Serializable { */ private Long id; - /** - * 折扣比例 - */ - private BigDecimal discount; - /** * 1 电信 2.移动 3.联通 */ @@ -75,14 +70,6 @@ public class RechargePrice implements Serializable { this.id = id; } - public BigDecimal getDiscount() { - return discount; - } - - public void setDiscount(BigDecimal discount) { - this.discount = discount; - } - public Integer getType() { return type; } @@ -176,7 +163,6 @@ public class RechargePrice implements Serializable { } RechargePrice other = (RechargePrice) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) - && (this.getDiscount() == null ? other.getDiscount() == null : this.getDiscount().equals(other.getDiscount())) && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort())) && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) @@ -194,7 +180,6 @@ public class RechargePrice implements Serializable { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); - result = prime * result + ((getDiscount() == null) ? 0 : getDiscount().hashCode()); result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode()); result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); @@ -215,7 +200,6 @@ public class RechargePrice implements Serializable { sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); - sb.append(", discount=").append(discount); sb.append(", type=").append(type); sb.append(", sort=").append(sort); sb.append(", price=").append(price); diff --git a/service/src/main/java/com/hfkj/entity/RechargePriceExample.java b/service/src/main/java/com/hfkj/entity/RechargePriceExample.java index ce1f3aa..540638e 100644 --- a/service/src/main/java/com/hfkj/entity/RechargePriceExample.java +++ b/service/src/main/java/com/hfkj/entity/RechargePriceExample.java @@ -186,66 +186,6 @@ public class RechargePriceExample { return (Criteria) this; } - public Criteria andDiscountIsNull() { - addCriterion("discount is null"); - return (Criteria) this; - } - - public Criteria andDiscountIsNotNull() { - addCriterion("discount is not null"); - return (Criteria) this; - } - - public Criteria andDiscountEqualTo(BigDecimal value) { - addCriterion("discount =", value, "discount"); - return (Criteria) this; - } - - public Criteria andDiscountNotEqualTo(BigDecimal value) { - addCriterion("discount <>", value, "discount"); - return (Criteria) this; - } - - public Criteria andDiscountGreaterThan(BigDecimal value) { - addCriterion("discount >", value, "discount"); - return (Criteria) this; - } - - public Criteria andDiscountGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("discount >=", value, "discount"); - return (Criteria) this; - } - - public Criteria andDiscountLessThan(BigDecimal value) { - addCriterion("discount <", value, "discount"); - return (Criteria) this; - } - - public Criteria andDiscountLessThanOrEqualTo(BigDecimal value) { - addCriterion("discount <=", value, "discount"); - return (Criteria) this; - } - - public Criteria andDiscountIn(List values) { - addCriterion("discount in", values, "discount"); - return (Criteria) this; - } - - public Criteria andDiscountNotIn(List values) { - addCriterion("discount not in", values, "discount"); - return (Criteria) this; - } - - public Criteria andDiscountBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("discount between", value1, value2, "discount"); - return (Criteria) this; - } - - public Criteria andDiscountNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("discount not between", value1, value2, "discount"); - return (Criteria) this; - } - public Criteria andTypeIsNull() { addCriterion("`type` is null"); return (Criteria) this; diff --git a/service/src/main/java/com/hfkj/qianzhu/channel/CinemaService.java b/service/src/main/java/com/hfkj/qianzhu/channel/CinemaService.java index 310abae..1723a70 100644 --- a/service/src/main/java/com/hfkj/qianzhu/channel/CinemaService.java +++ b/service/src/main/java/com/hfkj/qianzhu/channel/CinemaService.java @@ -26,7 +26,7 @@ public class CinemaService { */ public static JSONObject filmsPagedQuery(Map map) throws Exception { - JSONObject object = QianZhuService.request("/openApi/v1/films/pagedQuery" , map); + JSONObject object = QianZhuService.request("/openApi/v1/films/filmsPagedQuery" , map); if (object.getBoolean("success") && object.getInteger("code") == 10000) { return object; @@ -135,6 +135,45 @@ public class CinemaService { } + /** + * @MethodName pagedQuery + * @Description: 分页查询场次 + * @param map + * @return: com.alibaba.fastjson.JSONObject + * @Author: Sum1Dream + * @Date: 2024/6/25 上午9:58 + */ + public static JSONObject pagedQuery(Map map) throws Exception { + + JSONObject object = QianZhuService.request("/openApi/v2/shows/pagedQuery" , map); + + if (object.getBoolean("success") && object.getInteger("code") == 10000) { + return object; + } else { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); + } + + } + + /** + * @MethodName getRealTimeSeatByShowId + * @Description:查询场次实时座位 + * @param map + * @return: com.alibaba.fastjson.JSONObject + * @Author: Sum1Dream + * @Date: 2024/6/25 上午10:23 + */ + public static JSONObject getRealTimeSeatByShowId(Map map) throws Exception { + + JSONObject object = QianZhuService.request("/openApi/v1/shows/getRealTimeSeatByShowId" , map); + + if (object.getBoolean("success") && object.getInteger("code") == 10000) { + return object; + } else { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!"); + } + + } diff --git a/service/src/main/java/com/hfkj/qianzhu/channel/QianZhuService.java b/service/src/main/java/com/hfkj/qianzhu/channel/QianZhuService.java index 09a4688..f6e2cf1 100644 --- a/service/src/main/java/com/hfkj/qianzhu/channel/QianZhuService.java +++ b/service/src/main/java/com/hfkj/qianzhu/channel/QianZhuService.java @@ -5,13 +5,11 @@ import com.alibaba.fastjson.JSONObject; import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; -import com.hfkj.common.pay.util.sdk.WXPayConstants; import com.hfkj.common.utils.HttpsUtils; import com.hfkj.common.utils.MD5Util; import com.hfkj.common.utils.WxUtils; import com.hfkj.config.CommonSysConst; import com.hfkj.config.GenerateSign; -import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -86,6 +84,7 @@ public class QianZhuService { */ public static JSONObject getAllCities() throws Exception { + JSONObject object = QianZhuService.request("/openApi/v2/cities/listAll" , new HashMap<>()); if (object.getBoolean("success") && object.getInteger("code") == 10000) { diff --git a/service/src/main/java/com/hfkj/service/recharge/RechargeCodeService.java b/service/src/main/java/com/hfkj/service/recharge/RechargeCodeService.java new file mode 100644 index 0000000..9bf4025 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/recharge/RechargeCodeService.java @@ -0,0 +1,63 @@ +package com.hfkj.service.recharge; + +import com.hfkj.entity.RechargeCode; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName RechargeCodeService + * @Author Sum1Dream + * @Description + * @Date 2024/6/24 下午3:07 + **/ +public interface RechargeCodeService { + + /** + * @MethodName create + * @Description: 创建 + * @param rechargeCode + * @Author: Sum1Dream + * @Date: 2024/6/24 下午3:10 + */ + void create(RechargeCode rechargeCode); + + /** + * @MethodName update + * @Description: 更新 + * @param rechargeCode + * @Author: Sum1Dream + * @Date: 2024/6/24 下午3:11 + */ + void update(RechargeCode rechargeCode); + + /** + * @MethodName delete + * @Description: 删除 + * @param id + * @param fullDelete + * @Author: Sum1Dream + * @Date: 2024/6/24 下午3:11 + */ + void delete(Long id , Boolean fullDelete); + + /** + * @MethodName queryDetail + * @Description: 查询详情 + * @param id + * @return: com.hfkj.entity.RechargeCode + * @Author: Sum1Dream + * @Date: 2024/6/24 下午3:11 + */ + RechargeCode queryDetail(Long id); + + /** + * @MethodName getList + * @Description: 查询列表 + * @param map + * @return: java.util.List + * @Author: Sum1Dream + * @Date: 2024/6/24 下午3:11 + */ + List getList(Map map); +} diff --git a/service/src/main/java/com/hfkj/service/recharge/impl/RechargeCodeServiceImpl.java b/service/src/main/java/com/hfkj/service/recharge/impl/RechargeCodeServiceImpl.java new file mode 100644 index 0000000..016ed17 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/recharge/impl/RechargeCodeServiceImpl.java @@ -0,0 +1,43 @@ +package com.hfkj.service.recharge.impl; + +import com.hfkj.dao.RechargeCodeMapper; +import com.hfkj.entity.RechargeCode; +import com.hfkj.service.recharge.RechargeCodeService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +@Service("rechargeCodeService") +public class RechargeCodeServiceImpl implements RechargeCodeService { + + @Resource + private RechargeCodeMapper rechargeCodeMapper; + + @Override + public void create(RechargeCode rechargeCode) { + rechargeCodeMapper.insert(rechargeCode); + } + + @Override + public void update(RechargeCode rechargeCode) { + rechargeCodeMapper.updateByPrimaryKeySelective(rechargeCode); + } + + @Override + public void delete(Long id, Boolean fullDelete) { + rechargeCodeMapper.deleteByPrimaryKey(id); + } + + @Override + public RechargeCode queryDetail(Long id) { + return rechargeCodeMapper.selectByPrimaryKey(id); + } + + @Override + public List getList(Map map) { + return Collections.emptyList(); + } +}