dev-discount
袁野 3 years ago
parent f32bfbd960
commit b0768b14d5
  1. 16
      hai-bweb/src/main/java/com/bweb/controller/HighBrandController.java
  2. 163
      hai-bweb/src/main/java/com/bweb/controller/HighGoodsTypeController.java
  3. 10
      hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java
  4. 11
      hai-bweb/src/main/java/com/bweb/model/ExportOutRechargeOrder.java
  5. 1
      hai-service/src/main/java/com/hai/common/exception/ErrorCode.java
  6. 142
      hai-service/src/main/java/com/hai/dao/HighReserveMsgMapper.java
  7. 7
      hai-service/src/main/java/com/hai/dao/HighReserveMsgMapperExt.java
  8. 388
      hai-service/src/main/java/com/hai/dao/HighReserveMsgSqlProvider.java
  9. 6
      hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java
  10. 306
      hai-service/src/main/java/com/hai/entity/HighReserveMsg.java
  11. 1284
      hai-service/src/main/java/com/hai/entity/HighReserveMsgExample.java
  12. 9
      hai-service/src/main/java/com/hai/model/OutRechargeOrderModel.java
  13. 48
      hai-service/src/main/java/com/hai/service/HighBrandService.java
  14. 57
      hai-service/src/main/java/com/hai/service/HighGoodsTypeService.java
  15. 53
      hai-service/src/main/java/com/hai/service/HighOrderPreService.java
  16. 57
      hai-service/src/main/java/com/hai/service/impl/HighBrandServiceImpl.java
  17. 72
      hai-service/src/main/java/com/hai/service/impl/HighGoodsTypeServiceImpl.java
  18. 75
      hai-service/src/main/java/com/hai/service/impl/HighOrderPreServiceImpl.java
  19. 2
      hai-service/src/main/java/com/hai/service/impl/OutRechargePriceServiceImpl.java

@ -0,0 +1,16 @@
package com.bweb.controller;
import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* @Auther: 袁野
* @Description:
* @Date: 2021/3/26 23:08
*/
@Controller
@RequestMapping(value = "/highBrand")
@Api(value = "品牌接口")
public class HighBrandController {
}

@ -0,0 +1,163 @@
package com.bweb.controller;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.security.SessionObject;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighGoodsType;
import com.hai.model.HighAgentModel;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.service.HighGoodsTypeService;
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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* @Auther: 袁野
* @Description:
* @Date: 2021/3/26 23:08
*/
@Controller
@RequestMapping(value = "/highGoodsType")
@Api(value = "商品类型接口")
public class HighGoodsTypeController {
private static Logger log = LoggerFactory.getLogger(HighMerchantStoreController.class);
@Autowired
private UserCenter userCenter;
@Resource
private HighGoodsTypeService highGoodsTypeService;
@RequestMapping(value = "/getListGoodsType", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取商品类型列表")
public ResponseData getListGoodsType(@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize,
@RequestParam(name = "title", required = false) String title,
HttpServletRequest request) {
try {
Map<String,String> map = new HashMap<>();
map.put("title", title);
PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(highGoodsTypeService.getListGoodsType(map)));
} catch (Exception e) {
log.error("HighOrderController --> getUserOrderList() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getGoodsTypeById", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "根据id查询详情")
public ResponseData getGoodsTypeById(@RequestParam(name = "id", required = true) Integer id) {
try {
return ResponseMsgUtil.success(highGoodsTypeService.findById(id));
} catch (Exception e) {
log.error("HighOrderController --> getOrderById() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/insertGoodsType", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "新增商品类型")
public ResponseData insertGoodsType(@RequestBody HighGoodsType highGoodsType, HttpServletRequest request) {
try {
//发布人员
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
if (StringUtils.isBlank(highGoodsType.getTitle())
|| StringUtils.isBlank(highGoodsType.getImg())
) {
log.error("HighAgentController -> insertAgent() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
// 校验账号用户名是否存在
if (highGoodsTypeService.findByTitle(highGoodsType.getTitle())) {
log.error("HighGoodsTypeController --> insertGoodsType() error!", "用户名已存在");
throw ErrorHelp.genException(SysCode.System, ErrorCode.USER_LOGIN_NAME_IS_EXIST_ERROR, "");
}
highGoodsType.setCreatedTime(new Date());
highGoodsType.setCreatedUserId(userInfoModel.getSecUser().getId().intValue());
highGoodsType.setUpdatedTime(new Date());
highGoodsType.setUpdatedUserId(userInfoModel.getSecUser().getId().intValue());
highGoodsType.setStatus(1);
highGoodsTypeService.insertGoodsType(highGoodsType);
return ResponseMsgUtil.success("新增成功");
} catch (Exception e) {
log.error("HighAgentController --> insertAgent() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/updateGoodsType", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "修改商品类型")
public ResponseData updateGoodsType(@RequestBody HighGoodsType highGoodsType, HttpServletRequest request) {
try {
//发布人员
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
if (StringUtils.isBlank(highGoodsType.getTitle())
|| StringUtils.isBlank(highGoodsType.getImg())
|| highGoodsType.getId() != null
) {
log.error("HighAgentController -> insertAgent() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
HighGoodsType highGoodsTypes = highGoodsTypeService.findById(highGoodsType.getId());
// 校验账号用户名是否存在
if (highGoodsTypeService.findByTitle(highGoodsType.getTitle()) && !highGoodsTypes.getId().equals(highGoodsType.getId())) {
log.error("HighGoodsTypeController --> insertGoodsType() error!", "用户名已存在");
throw ErrorHelp.genException(SysCode.System, ErrorCode.USER_LOGIN_NAME_IS_EXIST_ERROR, "");
}
highGoodsTypes.setUpdatedTime(new Date());
highGoodsTypes.setUpdatedUserId(userInfoModel.getSecUser().getId().intValue());
highGoodsTypes.setImg(highGoodsType.getImg());
highGoodsTypes.setTitle(highGoodsType.getTitle());
highGoodsTypeService.updateGoodsType(highGoodsType);
return ResponseMsgUtil.success("修改成功");
} catch (Exception e) {
log.error("HighAgentController --> insertAgent() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -578,7 +578,7 @@ public class HighOrderController {
@RequestMapping(value = "/orderToRefundHlt", method = RequestMethod.GET) @RequestMapping(value = "/orderToRefundHlt", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "汇联通订单退款") @ApiOperation(value = "汇联通订单退款")
public ResponseData orderToRefund(@RequestParam(name = "orderId", required = false) Long orderId, public ResponseData orderToRefundHlt(@RequestParam(name = "orderId", required = false) Long orderId,
HttpServletRequest request) { HttpServletRequest request) {
try { try {
@ -589,10 +589,10 @@ public class HighOrderController {
} }
// 订单状态 : 1.待支付 2.已支付 3.已完成 4.已取消 5.已退款 // 订单状态 : 1.待支付 2.已支付 3.已完成 4.已取消 5.已退款
// if (order.getOrderStatus() != 2) { if (order.getOrderStatus() != 2) {
// log.error("orderToPay error!", "无法退款,订单不处于已支付状态"); log.error("orderToPay error!", "无法退款,订单不处于已支付状态");
// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法退款,订单不处于已支付状态"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法退款,订单不处于已支付状态");
// } }
JSONObject jsonObject = HuiLianTongUnionCardConfig.refund( "HFR"+new Date().getTime() , order.getOrderNo()); JSONObject jsonObject = HuiLianTongUnionCardConfig.refund( "HFR"+new Date().getTime() , order.getOrderNo());

@ -28,6 +28,9 @@ public class ExportOutRechargeOrder {
@ExcelProperty("支付方式") @ExcelProperty("支付方式")
private String payTypeName; private String payTypeName;
@ExcelProperty("卡号")
private String cardNo;
@ExcelProperty("订单金额") @ExcelProperty("订单金额")
private BigDecimal orderPrice; private BigDecimal orderPrice;
@ -215,4 +218,12 @@ public class ExportOutRechargeOrder {
public void setRefundId(String refundId) { public void setRefundId(String refundId) {
this.refundId = refundId; this.refundId = refundId;
} }
public String getCardNo() {
return cardNo;
}
public void setCardNo(String cardNo) {
this.cardNo = cardNo;
}
} }

@ -115,6 +115,7 @@ public enum ErrorCode {
NOT_ENTER_USER_PAY_PWD("2131","未输入支付密码"), NOT_ENTER_USER_PAY_PWD("2131","未输入支付密码"),
USER_PAY_PWD_ERROR("2132","支付密码错误"), USER_PAY_PWD_ERROR("2132","支付密码错误"),
NO_BIND_PHONE("2133","未绑定手机号"), NO_BIND_PHONE("2133","未绑定手机号"),
title_("2134","名称已存在"),
STATUS_ERROR("3000","状态错误"), STATUS_ERROR("3000","状态错误"),

@ -1,142 +0,0 @@
package com.hai.dao;
import com.hai.entity.HighReserveMsg;
import com.hai.entity.HighReserveMsgExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface HighReserveMsgMapper extends HighReserveMsgMapperExt {
@SelectProvider(type=HighReserveMsgSqlProvider.class, method="countByExample")
long countByExample(HighReserveMsgExample example);
@DeleteProvider(type=HighReserveMsgSqlProvider.class, method="deleteByExample")
int deleteByExample(HighReserveMsgExample example);
@Delete({
"delete from high_reserve_msg",
"where id = #{id,jdbcType=INTEGER}"
})
int deleteByPrimaryKey(Integer id);
@Insert({
"insert into high_reserve_msg (goods_name, order_id, ",
"pay_price, reserve_remark, ",
"reserve_time, user_name, ",
"user_phone, created_user_id, ",
"created_time, updated_user_id, ",
"updated_time, `status`, ",
"ext_1, ext_2, ext_3)",
"values (#{goodsName,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR}, ",
"#{payPrice,jdbcType=DECIMAL}, #{reserveRemark,jdbcType=VARCHAR}, ",
"#{reserveTime,jdbcType=TIMESTAMP}, #{userName,jdbcType=VARCHAR}, ",
"#{userPhone,jdbcType=VARCHAR}, #{createdUserId,jdbcType=VARCHAR}, ",
"#{createdTime,jdbcType=TIMESTAMP}, #{updatedUserId,jdbcType=VARCHAR}, ",
"#{updatedTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighReserveMsg record);
@InsertProvider(type=HighReserveMsgSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighReserveMsg record);
@SelectProvider(type=HighReserveMsgSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="reserve_remark", property="reserveRemark", jdbcType=JdbcType.VARCHAR),
@Result(column="reserve_time", property="reserveTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.VARCHAR),
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="updated_user_id", property="updatedUserId", jdbcType=JdbcType.VARCHAR),
@Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<HighReserveMsg> selectByExample(HighReserveMsgExample example);
@Select({
"select",
"id, goods_name, order_id, pay_price, reserve_remark, reserve_time, user_name, ",
"user_phone, created_user_id, created_time, updated_user_id, updated_time, `status`, ",
"ext_1, ext_2, ext_3",
"from high_reserve_msg",
"where id = #{id,jdbcType=INTEGER}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="reserve_remark", property="reserveRemark", jdbcType=JdbcType.VARCHAR),
@Result(column="reserve_time", property="reserveTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.VARCHAR),
@Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="updated_user_id", property="updatedUserId", jdbcType=JdbcType.VARCHAR),
@Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
HighReserveMsg selectByPrimaryKey(Integer id);
@UpdateProvider(type=HighReserveMsgSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighReserveMsg record, @Param("example") HighReserveMsgExample example);
@UpdateProvider(type=HighReserveMsgSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighReserveMsg record, @Param("example") HighReserveMsgExample example);
@UpdateProvider(type=HighReserveMsgSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighReserveMsg record);
@Update({
"update high_reserve_msg",
"set goods_name = #{goodsName,jdbcType=VARCHAR},",
"order_id = #{orderId,jdbcType=VARCHAR},",
"pay_price = #{payPrice,jdbcType=DECIMAL},",
"reserve_remark = #{reserveRemark,jdbcType=VARCHAR},",
"reserve_time = #{reserveTime,jdbcType=TIMESTAMP},",
"user_name = #{userName,jdbcType=VARCHAR},",
"user_phone = #{userPhone,jdbcType=VARCHAR},",
"created_user_id = #{createdUserId,jdbcType=VARCHAR},",
"created_time = #{createdTime,jdbcType=TIMESTAMP},",
"updated_user_id = #{updatedUserId,jdbcType=VARCHAR},",
"updated_time = #{updatedTime,jdbcType=TIMESTAMP},",
"`status` = #{status,jdbcType=INTEGER},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=INTEGER}"
})
int updateByPrimaryKey(HighReserveMsg record);
}

@ -1,7 +0,0 @@
package com.hai.dao;
/**
* mapper扩展类
*/
public interface HighReserveMsgMapperExt {
}

@ -1,388 +0,0 @@
package com.hai.dao;
import com.hai.entity.HighReserveMsg;
import com.hai.entity.HighReserveMsgExample.Criteria;
import com.hai.entity.HighReserveMsgExample.Criterion;
import com.hai.entity.HighReserveMsgExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighReserveMsgSqlProvider {
public String countByExample(HighReserveMsgExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_reserve_msg");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighReserveMsgExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_reserve_msg");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighReserveMsg record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_reserve_msg");
if (record.getGoodsName() != null) {
sql.VALUES("goods_name", "#{goodsName,jdbcType=VARCHAR}");
}
if (record.getOrderId() != null) {
sql.VALUES("order_id", "#{orderId,jdbcType=VARCHAR}");
}
if (record.getPayPrice() != null) {
sql.VALUES("pay_price", "#{payPrice,jdbcType=DECIMAL}");
}
if (record.getReserveRemark() != null) {
sql.VALUES("reserve_remark", "#{reserveRemark,jdbcType=VARCHAR}");
}
if (record.getReserveTime() != null) {
sql.VALUES("reserve_time", "#{reserveTime,jdbcType=TIMESTAMP}");
}
if (record.getUserName() != null) {
sql.VALUES("user_name", "#{userName,jdbcType=VARCHAR}");
}
if (record.getUserPhone() != null) {
sql.VALUES("user_phone", "#{userPhone,jdbcType=VARCHAR}");
}
if (record.getCreatedUserId() != null) {
sql.VALUES("created_user_id", "#{createdUserId,jdbcType=VARCHAR}");
}
if (record.getCreatedTime() != null) {
sql.VALUES("created_time", "#{createdTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdatedUserId() != null) {
sql.VALUES("updated_user_id", "#{updatedUserId,jdbcType=VARCHAR}");
}
if (record.getUpdatedTime() != null) {
sql.VALUES("updated_time", "#{updatedTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(HighReserveMsgExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("goods_name");
sql.SELECT("order_id");
sql.SELECT("pay_price");
sql.SELECT("reserve_remark");
sql.SELECT("reserve_time");
sql.SELECT("user_name");
sql.SELECT("user_phone");
sql.SELECT("created_user_id");
sql.SELECT("created_time");
sql.SELECT("updated_user_id");
sql.SELECT("updated_time");
sql.SELECT("`status`");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("high_reserve_msg");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
HighReserveMsg record = (HighReserveMsg) parameter.get("record");
HighReserveMsgExample example = (HighReserveMsgExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_reserve_msg");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=INTEGER}");
}
if (record.getGoodsName() != null) {
sql.SET("goods_name = #{record.goodsName,jdbcType=VARCHAR}");
}
if (record.getOrderId() != null) {
sql.SET("order_id = #{record.orderId,jdbcType=VARCHAR}");
}
if (record.getPayPrice() != null) {
sql.SET("pay_price = #{record.payPrice,jdbcType=DECIMAL}");
}
if (record.getReserveRemark() != null) {
sql.SET("reserve_remark = #{record.reserveRemark,jdbcType=VARCHAR}");
}
if (record.getReserveTime() != null) {
sql.SET("reserve_time = #{record.reserveTime,jdbcType=TIMESTAMP}");
}
if (record.getUserName() != null) {
sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}");
}
if (record.getUserPhone() != null) {
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}");
}
if (record.getCreatedUserId() != null) {
sql.SET("created_user_id = #{record.createdUserId,jdbcType=VARCHAR}");
}
if (record.getCreatedTime() != null) {
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdatedUserId() != null) {
sql.SET("updated_user_id = #{record.updatedUserId,jdbcType=VARCHAR}");
}
if (record.getUpdatedTime() != null) {
sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("high_reserve_msg");
sql.SET("id = #{record.id,jdbcType=INTEGER}");
sql.SET("goods_name = #{record.goodsName,jdbcType=VARCHAR}");
sql.SET("order_id = #{record.orderId,jdbcType=VARCHAR}");
sql.SET("pay_price = #{record.payPrice,jdbcType=DECIMAL}");
sql.SET("reserve_remark = #{record.reserveRemark,jdbcType=VARCHAR}");
sql.SET("reserve_time = #{record.reserveTime,jdbcType=TIMESTAMP}");
sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}");
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}");
sql.SET("created_user_id = #{record.createdUserId,jdbcType=VARCHAR}");
sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}");
sql.SET("updated_user_id = #{record.updatedUserId,jdbcType=VARCHAR}");
sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
HighReserveMsgExample example = (HighReserveMsgExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighReserveMsg record) {
SQL sql = new SQL();
sql.UPDATE("high_reserve_msg");
if (record.getGoodsName() != null) {
sql.SET("goods_name = #{goodsName,jdbcType=VARCHAR}");
}
if (record.getOrderId() != null) {
sql.SET("order_id = #{orderId,jdbcType=VARCHAR}");
}
if (record.getPayPrice() != null) {
sql.SET("pay_price = #{payPrice,jdbcType=DECIMAL}");
}
if (record.getReserveRemark() != null) {
sql.SET("reserve_remark = #{reserveRemark,jdbcType=VARCHAR}");
}
if (record.getReserveTime() != null) {
sql.SET("reserve_time = #{reserveTime,jdbcType=TIMESTAMP}");
}
if (record.getUserName() != null) {
sql.SET("user_name = #{userName,jdbcType=VARCHAR}");
}
if (record.getUserPhone() != null) {
sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}");
}
if (record.getCreatedUserId() != null) {
sql.SET("created_user_id = #{createdUserId,jdbcType=VARCHAR}");
}
if (record.getCreatedTime() != null) {
sql.SET("created_time = #{createdTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdatedUserId() != null) {
sql.SET("updated_user_id = #{updatedUserId,jdbcType=VARCHAR}");
}
if (record.getUpdatedTime() != null) {
sql.SET("updated_time = #{updatedTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=INTEGER}");
return sql.toString();
}
protected void applyWhere(SQL sql, HighReserveMsgExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -81,10 +81,12 @@ public interface OutRechargeOrderMapperExt {
" a.refund_time refundTime," + " a.refund_time refundTime," +
" a.refund_fee refundFee," + " a.refund_fee refundFee," +
" a.out_refund_no outRefundNo," + " a.out_refund_no outRefundNo," +
" a.refund_id refundId" + " a.refund_id refundId," +
" b.card_no cardNo" +
" FROM" + " FROM" +
" out_recharge_order a where 1 = 1 " + " out_recharge_order a join high_user_card b on a.user_id = b.user_id where 1 = 1 " +
"<if test='map.status != null'> and a.`status` = #{map.status} </if>", "<if test='map.status != null'> and a.`status` = #{map.status} </if>",
"<if test='map.code != null'> and a.`Identification_code` = #{map.code} </if>",
"<if test='map.orderNo != null'> and a.`order_no` = #{map.orderNo} </if>", "<if test='map.orderNo != null'> and a.`order_no` = #{map.orderNo} </if>",
"<if test='map.rechargeModel != null'> and a.`recharge_model` = #{map.rechargeModel} </if>", "<if test='map.rechargeModel != null'> and a.`recharge_model` = #{map.rechargeModel} </if>",
"<if test='map.rechargeContent != null'> and a.`recharge_content` LIKE '%${map.rechargeContent}%' </if>", "<if test='map.rechargeContent != null'> and a.`recharge_content` LIKE '%${map.rechargeContent}%' </if>",

@ -1,306 +0,0 @@
package com.hai.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* high_reserve_msg
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighReserveMsg implements Serializable {
/**
* 主键
*/
private Integer id;
/**
* 商品名称
*/
private String goodsName;
/**
* 订单ID
*/
private String orderId;
/**
* 支付金额
*/
private BigDecimal payPrice;
/**
* 预约备注
*/
private String reserveRemark;
/**
* 预约时间
*/
private Date reserveTime;
/**
* 用户名称
*/
private String userName;
/**
* 用户电话
*/
private String userPhone;
/**
* 创建人
*/
private String createdUserId;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedUserId;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 状态 1:预约中 2已预约 3完成 3: 异常
*/
private Integer status;
/**
* 扩展字段
*/
private String ext1;
/**
* 扩展字段
*/
private String ext2;
/**
* 扩展字段
*/
private String ext3;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getGoodsName() {
return goodsName;
}
public void setGoodsName(String goodsName) {
this.goodsName = goodsName;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public BigDecimal getPayPrice() {
return payPrice;
}
public void setPayPrice(BigDecimal payPrice) {
this.payPrice = payPrice;
}
public String getReserveRemark() {
return reserveRemark;
}
public void setReserveRemark(String reserveRemark) {
this.reserveRemark = reserveRemark;
}
public Date getReserveTime() {
return reserveTime;
}
public void setReserveTime(Date reserveTime) {
this.reserveTime = reserveTime;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserPhone() {
return userPhone;
}
public void setUserPhone(String userPhone) {
this.userPhone = userPhone;
}
public String getCreatedUserId() {
return createdUserId;
}
public void setCreatedUserId(String createdUserId) {
this.createdUserId = createdUserId;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public String getUpdatedUserId() {
return updatedUserId;
}
public void setUpdatedUserId(String updatedUserId) {
this.updatedUserId = updatedUserId;
}
public Date getUpdatedTime() {
return updatedTime;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
HighReserveMsg other = (HighReserveMsg) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName()))
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
&& (this.getPayPrice() == null ? other.getPayPrice() == null : this.getPayPrice().equals(other.getPayPrice()))
&& (this.getReserveRemark() == null ? other.getReserveRemark() == null : this.getReserveRemark().equals(other.getReserveRemark()))
&& (this.getReserveTime() == null ? other.getReserveTime() == null : this.getReserveTime().equals(other.getReserveTime()))
&& (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
&& (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone()))
&& (this.getCreatedUserId() == null ? other.getCreatedUserId() == null : this.getCreatedUserId().equals(other.getCreatedUserId()))
&& (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime()))
&& (this.getUpdatedUserId() == null ? other.getUpdatedUserId() == null : this.getUpdatedUserId().equals(other.getUpdatedUserId()))
&& (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode());
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
result = prime * result + ((getPayPrice() == null) ? 0 : getPayPrice().hashCode());
result = prime * result + ((getReserveRemark() == null) ? 0 : getReserveRemark().hashCode());
result = prime * result + ((getReserveTime() == null) ? 0 : getReserveTime().hashCode());
result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode());
result = prime * result + ((getCreatedUserId() == null) ? 0 : getCreatedUserId().hashCode());
result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
result = prime * result + ((getUpdatedUserId() == null) ? 0 : getUpdatedUserId().hashCode());
result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", goodsName=").append(goodsName);
sb.append(", orderId=").append(orderId);
sb.append(", payPrice=").append(payPrice);
sb.append(", reserveRemark=").append(reserveRemark);
sb.append(", reserveTime=").append(reserveTime);
sb.append(", userName=").append(userName);
sb.append(", userPhone=").append(userPhone);
sb.append(", createdUserId=").append(createdUserId);
sb.append(", createdTime=").append(createdTime);
sb.append(", updatedUserId=").append(updatedUserId);
sb.append(", updatedTime=").append(updatedTime);
sb.append(", status=").append(status);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -27,6 +27,7 @@ public class OutRechargeOrderModel extends OutRechargeOrder {
private BigDecimal refundFee; private BigDecimal refundFee;
private String outRefundNo; private String outRefundNo;
private String refundId; private String refundId;
private String cardNo;
public String getOrderNo() { public String getOrderNo() {
return orderNo; return orderNo;
@ -187,4 +188,12 @@ public class OutRechargeOrderModel extends OutRechargeOrder {
public void setRefundId(String refundId) { public void setRefundId(String refundId) {
this.refundId = refundId; this.refundId = refundId;
} }
public String getCardNo() {
return cardNo;
}
public void setCardNo(String cardNo) {
this.cardNo = cardNo;
}
} }

@ -0,0 +1,48 @@
package com.hai.service;
import com.hai.entity.HighBrand;
import com.hai.entity.HighOrderPre;
import java.util.List;
import java.util.Map;
public interface HighBrandService {
/**
* @Author Sum1Dream
* @Description // 查询接口
* @Date 15:18 2021/6/11
* @Param [map]
* @return java.util.List<com.hai.entity.HighBrand>
**/
List<HighBrand> getListBand(Map<String , String> map);
/**
* @Author Sum1Dream
* @Description // 根据订单ID查询订单
* @Date 15:19 2021/6/11
* @Param [id]
* @return com.hai.entity.HighBrand
**/
HighBrand findByOrderId(Integer id);
/***
* @Author Sum1Dream
* @Description // 新增订单
* @Date 15:25 2021/6/11
* @Param [HighOrderPre]
* @return void
**/
void insertBrand(HighBrand highBrand);
/***
* @Author Sum1Dream
* @Description // 修改订单
* @Date 15:26 2021/6/11
* @Param [highBrand]
* @return void
**/
void updateBrand(HighBrand highBrand);
}

@ -0,0 +1,57 @@
package com.hai.service;
import com.hai.entity.HighGoodsType;
import com.hai.entity.HighOrderPre;
import java.util.List;
import java.util.Map;
public interface HighGoodsTypeService {
/**
* @Author Sum1Dream
* @Description // 查询
* @Date 15:18 2021/6/11
* @Param [map]
* @return java.util.List<com.hai.entity.HighOrderPre>
**/
List<HighGoodsType> getListGoodsType(Map<String , String> map);
/**
* @Author Sum1Dream
* @Description // 根据ID查询
* @Date 15:19 2021/6/11
* @Param [orderId]
* @return com.hai.entity.HighOrderPre
**/
HighGoodsType findById(Integer Id);
/**
* @Author Sum1Dream
* @name HighGoodsType.java
* @Description // 根据标题判断是否存在
* @Date 4:58 下午 2021/11/11
* @Param
* @return
**/
Boolean findByTitle(String title);
/***
* @Author Sum1Dream
* @Description // 新增
* @Date 15:25 2021/6/11
* @Param [HighOrderPre]
* @return void
**/
void insertGoodsType(HighGoodsType highGoodsType);
/***
* @Author Sum1Dream
* @Description // 修改
* @Date 15:26 2021/6/11
* @Param [HighOrderPre]
* @return void
**/
void updateGoodsType(HighGoodsType highGoodsType);
}

@ -0,0 +1,53 @@
package com.hai.service;
import com.hai.entity.HighOrderPre;
import java.util.List;
import java.util.Map;
public interface HighOrderPreService {
/**
* @Author Sum1Dream
* @Description // 查询充值订单
* @Date 15:18 2021/6/11
* @Param [map]
* @return java.util.List<com.hai.entity.HighOrderPre>
**/
List<HighOrderPre> getListOrderPre(Map<String , String> map);
/**
* @Author Sum1Dream
* @Description // 根据订单ID查询订单
* @Date 15:19 2021/6/11
* @Param [orderId]
* @return com.hai.entity.HighOrderPre
**/
HighOrderPre findByOrderId(Long orderId);
/**
* @Author Sum1Dream
* @Description // 根据订单号查询订单
* @Date 15:20 2021/6/11
* @Param [orderNo]
* @return com.hai.entity.HighOrderPre
**/
HighOrderPre findByOrderNo(String orderNo);
/***
* @Author Sum1Dream
* @Description // 新增订单
* @Date 15:25 2021/6/11
* @Param [HighOrderPre]
* @return void
**/
void insertOrderPre(HighOrderPre highOrderPre);
/***
* @Author Sum1Dream
* @Description // 修改订单
* @Date 15:26 2021/6/11
* @Param [HighOrderPre]
* @return void
**/
void updateOrderPre(HighOrderPre highOrderPre);
}

@ -0,0 +1,57 @@
package com.hai.service.impl;
import com.hai.dao.HighBrandMapper;
import com.hai.entity.HighBrand;
import com.hai.entity.HighBrandExample;
import com.hai.entity.HighOrder;
import com.hai.service.HighBrandService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* @Auther: 袁野
* @Description:
* @Date: 2021/3/26 23:06
*/
@Service("highBrandService")
public class HighBrandServiceImpl implements HighBrandService {
@Resource
private HighBrandMapper highBrandMapper;
@Override
public List<HighBrand> getListBand(Map<String, String> map) {
HighBrandExample example = new HighBrandExample();
HighBrandExample.Criteria criteria = example.createCriteria();
if (MapUtils.getString(map, "title") != null) {
criteria.andTitleLike("%" + MapUtils.getString(map, "title") + "%");
}
criteria.andStatusEqualTo(1);
example.setOrderByClause("created_time desc");
return highBrandMapper.selectByExample(example);
}
@Override
public HighBrand findByOrderId(Integer id) {
return highBrandMapper.selectByPrimaryKey(id);
}
@Override
public void insertBrand(HighBrand highBrand) {
highBrandMapper.insert(highBrand);
}
@Override
public void updateBrand(HighBrand highBrand) {
highBrandMapper.updateByPrimaryKey(highBrand);
}
}

@ -0,0 +1,72 @@
package com.hai.service.impl;
import com.hai.dao.HighGoodsTypeMapper;
import com.hai.entity.HighGoodsType;
import com.hai.entity.HighGoodsTypeExample;
import com.hai.service.HighGoodsTypeService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* @serviceName HighGoodsTypeServiceImpl.java
* @author Sum1Dream
* @version 1.0.0
* @Description //TODO
* @createTime 3:36 下午 2021/11/11
**/
@Service("highGoodsTypeService")
public class HighGoodsTypeServiceImpl implements HighGoodsTypeService {
@Resource
private HighGoodsTypeMapper highGoodsTypeMapper;
@Override
public List<HighGoodsType> getListGoodsType(Map<String, String> map) {
HighGoodsTypeExample example = new HighGoodsTypeExample();
HighGoodsTypeExample.Criteria criteria = example.createCriteria();
if (MapUtils.getString(map, "title") != null) {
criteria.andTitleLike("%" + MapUtils.getString(map, "title") + "%");
}
criteria.andStatusEqualTo(1);
example.setOrderByClause("created_time desc");
return highGoodsTypeMapper.selectByExample(example);
}
@Override
public HighGoodsType findById(Integer id) {
return highGoodsTypeMapper.selectByPrimaryKey(id);
}
@Override
public Boolean findByTitle(String title) {
HighGoodsTypeExample example = new HighGoodsTypeExample();
HighGoodsTypeExample.Criteria criteria = example.createCriteria();
criteria.andTitleEqualTo(title).andStatusEqualTo(1);
List<HighGoodsType> highGoodsTypes = highGoodsTypeMapper.selectByExample(example);
return highGoodsTypes.size() > 0;
}
@Override
public void insertGoodsType(HighGoodsType highGoodsType) {
highGoodsTypeMapper.insert(highGoodsType);
}
@Override
public void updateGoodsType(HighGoodsType highGoodsType) {
highGoodsTypeMapper.updateByPrimaryKey(highGoodsType);
}
}

@ -0,0 +1,75 @@
package com.hai.service.impl;
import com.hai.common.utils.DateUtil;
import com.hai.dao.HighOrderPreMapper;
import com.hai.entity.HighOrder;
import com.hai.entity.HighOrderPre;
import com.hai.entity.HighOrderPreExample;
import com.hai.service.HighOrderPreService;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service("highOrderPreService")
public class HighOrderPreServiceImpl implements HighOrderPreService {
@Resource
private HighOrderPreMapper highOrderPreMapper;
@Override
public List<HighOrderPre> getListOrderPre(Map<String, String> map) {
HighOrderPreExample example = new HighOrderPreExample();
HighOrderPreExample.Criteria criteria = example.createCriteria();
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
}
if (MapUtils.getInteger(map, "goodsType") != null) {
criteria.andGoodsTypeEqualTo(MapUtils.getInteger(map, "goodsType"));
}
if (MapUtils.getString(map, "orderNo") != null) {
criteria.andOrderNoLike("%" + MapUtils.getString(map, "orderNo") + "%");
}
if (MapUtils.getString(map, "goodsName") != null) {
criteria.andGoodsNameLike("%" + MapUtils.getString(map, "goodsName") + "%");
}
if (MapUtils.getString(map, "userPhone") != null) {
criteria.andPreUserPhoneEqualTo(MapUtils.getString(map, "userPhone"));
}
if (StringUtils.isNotBlank(map.get("createTimeS")) && StringUtils.isNotBlank(map.get("createTimeE"))) {
criteria.andCreateTimeBetween(
DateUtil.format(map.get("createTimeS") , "yyyy-MM-dd HH:mm:ss") ,
DateUtil.format(map.get("createTimeE") , "yyyy-MM-dd HH:mm:ss"));
}
return highOrderPreMapper.selectByExample(example);
}
@Override
public HighOrderPre findByOrderId(Long orderId) {
return highOrderPreMapper.selectByPrimaryKey(orderId);
}
@Override
public HighOrderPre findByOrderNo(String orderNo) {
return null;
}
@Override
public void insertOrderPre(HighOrderPre highOrderPre) {
highOrderPreMapper.insert(highOrderPre);
}
@Override
public void updateOrderPre(HighOrderPre highOrderPre) {
highOrderPreMapper.updateByPrimaryKey(highOrderPre);
}
}

@ -34,6 +34,8 @@ public class OutRechargePriceServiceImpl implements OutRechargePriceService {
OutRechargePriceExample example = new OutRechargePriceExample(); OutRechargePriceExample example = new OutRechargePriceExample();
OutRechargePriceExample.Criteria criteria = example.createCriteria(); OutRechargePriceExample.Criteria criteria = example.createCriteria();
criteria.andStatusEqualTo(1);
if (StringUtils.isNotBlank(map.get("type"))) { if (StringUtils.isNotBlank(map.get("type"))) {
criteria.andTypeEqualTo(Integer.valueOf(map.get("type"))); criteria.andTypeEqualTo(Integer.valueOf(map.get("type")));
} }

Loading…
Cancel
Save