袁野 4 months ago
parent c14327b9bd
commit 32379dc6a8
  1. 26
      bweb/src/main/java/com/bweb/controller/BsUserController.java
  2. 125
      bweb/src/main/java/com/bweb/controller/cms/CmsContentController.java
  3. 18
      bweb/src/main/java/com/bweb/controller/discount/DiscountController.java
  4. 1
      bweb/src/main/java/com/bweb/controller/goods/GoodsBrandController.java
  5. 16
      bweb/src/main/java/com/bweb/controller/goods/GoodsController.java
  6. 1
      bweb/src/main/java/com/bweb/controller/goods/GoodsTypeController.java
  7. 4
      cweb/src/main/java/com/cweb/controller/cms/CmsContentController.java
  8. 11
      cweb/src/main/java/com/cweb/controller/discount/DiscountController.java
  9. 4
      cweb/src/main/java/com/cweb/controller/goods/GoodsController.java
  10. 8
      order/src/main/java/com/order/controller/OrderPayController.java
  11. 5
      service/src/main/java/com/hfkj/model/order/OrderModel.java
  12. 12
      service/src/main/java/com/hfkj/service/cms/impl/CmsContentServiceImpl.java
  13. 8
      service/src/main/java/com/hfkj/service/discount/CouponDiscountPackageService.java
  14. 1
      service/src/main/java/com/hfkj/service/discount/impl/CouponDiscountPackageServiceImpl.java
  15. 3
      service/src/main/java/com/hfkj/service/discount/impl/CouponDiscountServiceImpl.java
  16. 4
      service/src/main/java/com/hfkj/service/discount/impl/CouponDiscountUserRelServiceImpl.java
  17. 2
      service/src/main/java/com/hfkj/service/goods/impl/GoodsBrandServiceImpl.java
  18. 6
      service/src/main/java/com/hfkj/service/goods/impl/GoodsTypeServiceImpl.java
  19. 1
      service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java
  20. 68
      service/src/main/java/com/hfkj/service/user/BsUserComplaintService.java
  21. 68
      service/src/main/java/com/hfkj/service/user/impl/BsUserComplaintServiceImpl.java
  22. 82
      user/src/main/java/com/user/controller/BsUserController.java

@ -8,7 +8,9 @@ import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode; import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsUser; import com.hfkj.entity.BsUser;
import com.hfkj.entity.BsUserComplaint;
import com.hfkj.model.ResponseData; import com.hfkj.model.ResponseData;
import com.hfkj.service.user.BsUserComplaintService;
import com.hfkj.service.user.BsUserService; import com.hfkj.service.user.BsUserService;
import com.hfkj.service.user.impl.BsUserServiceImpl; import com.hfkj.service.user.impl.BsUserServiceImpl;
import com.hfkj.sysenum.SecUserStatusEnum; import com.hfkj.sysenum.SecUserStatusEnum;
@ -37,6 +39,9 @@ public class BsUserController {
@Resource @Resource
private BsUserService userService; private BsUserService userService;
@Resource
private BsUserComplaintService userComplaintService;
@RequestMapping(value="/restore",method = RequestMethod.POST) @RequestMapping(value="/restore",method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ApiOperation(value = "恢复") @ApiOperation(value = "恢复")
@ -111,4 +116,25 @@ public class BsUserController {
return ResponseMsgUtil.exception(e); return ResponseMsgUtil.exception(e);
} }
} }
@RequestMapping(value="/queryComplaintList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询用户投诉列表")
public ResponseData queryComplaintList(@RequestParam(value = "name" , required = false) String name,
@RequestParam(value = "phone" , required = false) String phone,
@RequestParam(value = "pageNum" , required = true) Integer pageNum,
@RequestParam(value = "pageSize" , required = true) Integer pageSize) {
try {
Map<String,Object> param = new HashMap<>();
param.put("name", name);
param.put("phone", phone);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(userComplaintService.getList(param)));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
} }

@ -1,19 +1,31 @@
package com.bweb.controller.cms; package com.bweb.controller.cms;
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.OrderUtil;
import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.AuditMsg;
import com.hfkj.entity.CmsContent;
import com.hfkj.entity.GoodsBrand;
import com.hfkj.entity.GoodsMsg;
import com.hfkj.model.ResponseData; import com.hfkj.model.ResponseData;
import com.hfkj.model.SecUserSessionObject;
import com.hfkj.service.cms.CmsContentService; import com.hfkj.service.cms.CmsContentService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -27,18 +39,119 @@ public class CmsContentController {
@Resource @Resource
private CmsContentService cmsContentService; private CmsContentService cmsContentService;
@RequestMapping(value="/editCms",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "编辑CMS")
public ResponseData editCms(@RequestBody CmsContent body, HttpServletRequest request) {
try {
if (body == null
|| body.getPlatformCode() == null
|| StringUtils.isBlank(body.getName())
|| StringUtils.isBlank(body.getCode())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
CmsContent cmsContent;
if (body.getId() != null) {
// 查询CMS
cmsContent = cmsContentService.queryDetail(body.getId());
if (cmsContent == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.CONTENT_NOT_FOUND, "");
}
} else {
cmsContent = new CmsContent();
cmsContent.setCreateTime(new Date());
}
cmsContent.setUpdateTime(new Date());
cmsContent.setStatus(1);
cmsContent.setName(body.getName());
cmsContent.setAppid(body.getAppid());
cmsContent.setJumpType(body.getJumpType());
cmsContent.setJumpUrl(body.getJumpUrl());
cmsContent.setPlatformCode(body.getPlatformCode());
cmsContent.setImg(body.getImg());
cmsContent.setCode(body.getCode());
if (body.getId() != null) {
cmsContentService.update(cmsContent);
} else {
cmsContentService.create(cmsContent);
}
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getCms",method = RequestMethod.GET) @RequestMapping(value="/getCms",method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "查询列表") @ApiOperation(value = "查询列表")
public ResponseData getCms(@RequestParam(value = "code" , required = false) String code, public ResponseData getCms(@RequestParam(value = "code" , required = false) String code,
@RequestParam(value = "platformCode" , required = false) String platformCode) { @RequestParam(value = "name" , required = false) String name,
@RequestParam(value = "status" , required = false) Integer status,
@RequestParam(value = "platformCode" , required = false) String platformCode,
@RequestParam(value = "pageNum" , required = true) Integer pageNum,
@RequestParam(value = "pageSize" , required = true) Integer pageSize) {
try { try {
Map<String , Object> map = new HashMap<>(); Map<String , Object> map = new HashMap<>();
map.put("code", code); map.put("code", code);
map.put("platformCode", platformCode); map.put("platformCode", platformCode);
map.put("name", name);
map.put("status", status);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(cmsContentService.getList(map)));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/delete",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "删除")
public ResponseData delete(@RequestParam(value = "id" , required = false) Long id) {
try {
cmsContentService.delete(id , false);
return ResponseMsgUtil.success("删除成功");
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/cmsUpDown",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "商品上下架")
public ResponseData cmsUpDown(@RequestParam(value = "id" , required = false) Long id, HttpServletRequest request) {
try {
CmsContent cmsContent = cmsContentService.queryDetail(id);
if (cmsContent.getStatus() == 1) {
cmsContent.setStatus(2);
cmsContent.setUpdateTime(new Date());
} else if (cmsContent.getStatus() == 2) {
cmsContent.setStatus(1);
cmsContent.setUpdateTime(new Date());
}
cmsContentService.update(cmsContent);
return ResponseMsgUtil.success(cmsContentService.getList(map)); return ResponseMsgUtil.success("成功");
} catch (Exception e) { } catch (Exception e) {
log.error("error!",e); log.error("error!",e);

@ -52,9 +52,10 @@ public class DiscountController {
@RequestMapping(value="/editDiscount",method = RequestMethod.POST) @RequestMapping(value="/editDiscount",method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ApiOperation(value = "编辑商品品牌") @ApiOperation(value = "编辑优惠券")
public ResponseData editDiscount(@RequestBody CouponDiscount body, HttpServletRequest request) { public ResponseData editDiscount(@RequestBody CouponDiscount body, HttpServletRequest request) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request); SessionObject sessionObject = userCenter.getSessionObject(request);
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject(); SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject();
@ -63,6 +64,7 @@ public class DiscountController {
|| body.getType() == null || body.getType() == null
|| body.getEffectiveNum() == null || body.getEffectiveNum() == null
|| body.getEffectiveDay() == null || body.getEffectiveDay() == null
|| body.getPlatformCode() == null
|| body.getSalesEndTime() == null || body.getSalesEndTime() == null
|| StringUtils.isBlank(body.getName())) { || StringUtils.isBlank(body.getName())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
@ -102,6 +104,7 @@ public class DiscountController {
couponDiscount.setType(body.getType()); couponDiscount.setType(body.getType());
couponDiscount.setEffectiveNum(body.getEffectiveNum()); couponDiscount.setEffectiveNum(body.getEffectiveNum());
couponDiscount.setName(body.getName()); couponDiscount.setName(body.getName());
couponDiscount.setPlatformCode(body.getPlatformCode());
couponDiscount.setPercentage(body.getPercentage()); couponDiscount.setPercentage(body.getPercentage());
couponDiscount.setPrice(body.getPrice()); couponDiscount.setPrice(body.getPrice());
couponDiscount.setCondition(body.getCondition()); couponDiscount.setCondition(body.getCondition());
@ -118,6 +121,10 @@ public class DiscountController {
} }
return ResponseMsgUtil.success("操作成功"); return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
} }
@ -127,6 +134,7 @@ public class DiscountController {
public ResponseData getListDiscount(@RequestParam(value = "name" , required = false) String name, public ResponseData getListDiscount(@RequestParam(value = "name" , required = false) String name,
@RequestParam(value = "type" , required = false) Integer type, @RequestParam(value = "type" , required = false) Integer type,
@RequestParam(value = "status" , required = false) Integer status, @RequestParam(value = "status" , required = false) Integer status,
@RequestParam(value = "platformCode" , required = false) String platformCode,
@RequestParam(value = "pageNum" , required = true) Integer pageNum, @RequestParam(value = "pageNum" , required = true) Integer pageNum,
@RequestParam(value = "pageSize" , required = true) Integer pageSize) { @RequestParam(value = "pageSize" , required = true) Integer pageSize) {
try { try {
@ -135,6 +143,7 @@ public class DiscountController {
map.put("name", name); map.put("name", name);
map.put("type", type); map.put("type", type);
map.put("status", status); map.put("status", status);
map.put("platformCode", platformCode);
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(couponDiscountService.getList(map))); return ResponseMsgUtil.success(new PageInfo<>(couponDiscountService.getList(map)));
@ -200,6 +209,8 @@ public class DiscountController {
@ApiOperation(value = "绑定优惠券规格") @ApiOperation(value = "绑定优惠券规格")
public ResponseData bindDiscountSpecs(@RequestBody JSONObject body) { public ResponseData bindDiscountSpecs(@RequestBody JSONObject body) {
try {
if (body == null if (body == null
|| body.getLong("discountId") == null || body.getLong("discountId") == null
|| StringUtils.isBlank(body.getString("specsIds"))) { || StringUtils.isBlank(body.getString("specsIds"))) {
@ -221,6 +232,11 @@ public class DiscountController {
} }
return ResponseMsgUtil.success("操作成功"); return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
} }

@ -49,7 +49,6 @@ public class GoodsBrandController {
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject(); SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject();
if (body == null if (body == null
|| body.getImgUrl() == null
|| StringUtils.isBlank(body.getTitle())) { || StringUtils.isBlank(body.getTitle())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
} }

@ -71,11 +71,6 @@ public class GoodsController {
SessionObject sessionObject = userCenter.getSessionObject(request); SessionObject sessionObject = userCenter.getSessionObject(request);
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject(); SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject();
if (userModel.getAccount().getObjectType() != SecUserObjectTypeEnum.type2.getCode()) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, "");
}
if (body == null if (body == null
|| body.getGoodsBrand() == null || body.getGoodsBrand() == null
|| body.getGoodsType() == null || body.getGoodsType() == null
@ -99,6 +94,9 @@ public class GoodsController {
goodsMsg = new GoodsMsg(); goodsMsg = new GoodsMsg();
goodsMsg.setCreateTime(new Date()); goodsMsg.setCreateTime(new Date());
goodsMsg.setSaleNum(0); goodsMsg.setSaleNum(0);
goodsMsg.setMerId(userModel.getAccount().getObjectId());
goodsMsg.setMerName(userModel.getAccount().getUserName());
body.setStatus(2);
} }
GoodsType goodsType = goodsTypeService.queryDetail(body.getGoodsType()); GoodsType goodsType = goodsTypeService.queryDetail(body.getGoodsType());
@ -106,7 +104,6 @@ public class GoodsController {
if (goodsType.getParentId() == null) { if (goodsType.getParentId() == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "一级分类不可选择!"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "一级分类不可选择!");
} }
goodsMsg.setUpdateTime(new Date()); goodsMsg.setUpdateTime(new Date());
goodsMsg.setGoodsBrandName(goodsBrandService.findGoodsBrandName(body.getGoodsBrand())); goodsMsg.setGoodsBrandName(goodsBrandService.findGoodsBrandName(body.getGoodsBrand()));
goodsMsg.setGoodsTypeName(goodsTypeService.findGoodsType(body.getGoodsType())); goodsMsg.setGoodsTypeName(goodsTypeService.findGoodsType(body.getGoodsType()));
@ -115,15 +112,13 @@ public class GoodsController {
goodsMsg.setGoodsTypeParentName(goodsTypeService.findGoodsType(goodsType.getParentId())); goodsMsg.setGoodsTypeParentName(goodsTypeService.findGoodsType(goodsType.getParentId()));
goodsMsg.setType(body.getType()); goodsMsg.setType(body.getType());
goodsMsg.setGoodsBrand(body.getGoodsBrand()); goodsMsg.setGoodsBrand(body.getGoodsBrand());
goodsMsg.setStatus(2); goodsMsg.setStatus(body.getStatus());
goodsMsg.setTitle(body.getTitle()); goodsMsg.setTitle(body.getTitle());
goodsMsg.setGoodsExplain(body.getGoodsExplain()); goodsMsg.setGoodsExplain(body.getGoodsExplain());
goodsMsg.setGoodsLabel(body.getGoodsLabel()); goodsMsg.setGoodsLabel(body.getGoodsLabel());
goodsMsg.setListImg(body.getListImg()); goodsMsg.setListImg(body.getListImg());
goodsMsg.setBannerImg(body.getBannerImg()); goodsMsg.setBannerImg(body.getBannerImg());
goodsMsg.setDetailImg(body.getDetailImg()); goodsMsg.setDetailImg(body.getDetailImg());
goodsMsg.setMerId(userModel.getAccount().getObjectId());
goodsMsg.setMerName(userModel.getAccount().getUserName());
if (body.getId() != null) { if (body.getId() != null) {
goodsMsgService.update(goodsMsg); goodsMsgService.update(goodsMsg);
@ -241,6 +236,9 @@ public class GoodsController {
} }
} }
goodsMsg.setStatus(2);
goodsMsgService.update(goodsMsg);
return ResponseMsgUtil.success("操作成功"); return ResponseMsgUtil.success("操作成功");
} catch (Exception e) { } catch (Exception e) {

@ -66,6 +66,7 @@ public class GoodsTypeController {
goodsType.setStatus(1); goodsType.setStatus(1);
goodsType.setTitle(body.getTitle()); goodsType.setTitle(body.getTitle());
goodsType.setParentId(body.getParentId()); goodsType.setParentId(body.getParentId());
goodsType.setSort(body.getSort());
goodsType.setBusinessType(body.getBusinessType()); goodsType.setBusinessType(body.getBusinessType());
goodsType.setImgUrl(body.getImgUrl()); goodsType.setImgUrl(body.getImgUrl());
goodsType.setOpId(userModel.getAccount().getId()); goodsType.setOpId(userModel.getAccount().getId());

@ -36,8 +36,10 @@ public class CmsContentController {
Map<String , Object> map = new HashMap<>(); Map<String , Object> map = new HashMap<>();
map.put("code", code); map.put("code", code);
if (platformCode == null) {
platformCode = "WXAPPLETS";
}
map.put("platformCode", platformCode); map.put("platformCode", platformCode);
return ResponseMsgUtil.success(cmsContentService.getList(map)); return ResponseMsgUtil.success(cmsContentService.getList(map));
} catch (Exception e) { } catch (Exception e) {

@ -18,6 +18,7 @@ import com.hfkj.service.discount.CouponDiscountService;
import com.hfkj.service.discount.CouponDiscountUserRelService; import com.hfkj.service.discount.CouponDiscountUserRelService;
import com.hfkj.service.goods.impl.GoodsMsgServiceImpl; import com.hfkj.service.goods.impl.GoodsMsgServiceImpl;
import com.hfkj.service.goods.impl.GoodsSpecsServiceImpl; import com.hfkj.service.goods.impl.GoodsSpecsServiceImpl;
import com.hfkj.sysenum.UserLoginPlatform;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -76,7 +77,9 @@ public class DiscountController {
@RequestMapping(value = "/getGoodsDiscount", method = RequestMethod.GET) @RequestMapping(value = "/getGoodsDiscount", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "获取商品可用优惠券") @ApiOperation(value = "获取商品可用优惠券")
public ResponseData getGoodsDiscount(@RequestParam(value = "specsIds", required = true) String specsIds) { public ResponseData getGoodsDiscount(@RequestParam(value = "specsIds", required = true) String specsIds,
@RequestParam(value = "platformCode" , required = false) String platformCode
) {
try { try {
// 用户session // 用户session
@ -85,6 +88,12 @@ public class DiscountController {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("userId", userSession.getUser().getId()); map.put("userId", userSession.getUser().getId());
if (platformCode == null) {
map.put("platformCode", UserLoginPlatform.WXAPPLETS.getCode());
} else {
map.put("platformCode", platformCode);
}
map.put("status", 1); map.put("status", 1);
List<CouponDiscountUserRel> list = discountUserRelService.getList(map); List<CouponDiscountUserRel> list = discountUserRelService.getList(map);

@ -65,7 +65,9 @@ public class GoodsController {
public ResponseData getListGoodsType() { public ResponseData getListGoodsType() {
try { try {
List<GoodsType> list = goodsTypeService.getList(new HashMap<>()); Map<String ,Object> map = new HashMap<>();
map.put("status" , 1);
List<GoodsType> list = goodsTypeService.getList(map);
List<GoodsTypeModel> goodsTypeModels = goodsTypeService.getGoodsTypeModelList(list); List<GoodsTypeModel> goodsTypeModels = goodsTypeService.getGoodsTypeModelList(list);

@ -198,10 +198,10 @@ public class OrderPayController {
if (bsUserLoginLog != null) { if (bsUserLoginLog != null) {
bsOrderOutside.setPlatformCode(bsOrderOutside.getPlatformCode()); bsOrderOutside.setPlatformCode(bsUserLoginLog.getPlatformCode());
bsOrderOutside.setPlatformName(bsOrderOutside.getPlatformName()); bsOrderOutside.setPlatformName(bsUserLoginLog.getPlatformName());
bsOrderOutside.setLoginTypeCode(bsOrderOutside.getLoginTypeCode()); bsOrderOutside.setLoginTypeCode(bsUserLoginLog.getLoginTypeCode());
bsOrderOutside.setLoginTypeName(bsOrderOutside.getLoginTypeName()); bsOrderOutside.setLoginTypeName(bsUserLoginLog.getLoginTypeName());
} }
bsOrderOutside.setOrderNo(order.getOrderNo()); bsOrderOutside.setOrderNo(order.getOrderNo());
bsOrderOutside.setStatus(1); bsOrderOutside.setStatus(1);

@ -38,4 +38,9 @@ public class OrderModel extends BsOrder {
*/ */
private List<OrderChildModel> orderChildList; private List<OrderChildModel> orderChildList;
/**
* 子订单列表
*/
private String platformCode;
} }

@ -52,12 +52,18 @@ public class CmsContentServiceImpl implements CmsContentService {
if (StringUtils.isNotBlank(MapUtils.getString(map, "code"))) { if (StringUtils.isNotBlank(MapUtils.getString(map, "code"))) {
criteria.andCodeEqualTo(MapUtils.getString(map, "code")); criteria.andCodeEqualTo(MapUtils.getString(map, "code"));
} }
if (StringUtils.isNotBlank(MapUtils.getString(map, "name"))) {
criteria.andNameEqualTo(MapUtils.getString(map, "name"));
}
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
} else {
criteria.andStatusNotEqualTo(0);
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "platformCode"))) { if (StringUtils.isNotBlank(MapUtils.getString(map, "platformCode"))) {
criteria.andPlatformCodeEqualTo(MapUtils.getString(map, "platformCode")); criteria.andPlatformCodeEqualTo(MapUtils.getString(map, "platformCode"));
}else {
criteria.andPlatformCodeEqualTo("H5");
} }
criteria.andStatusNotEqualTo(0);
return cmsContentMapper.selectByExample(example); return cmsContentMapper.selectByExample(example);
} }
} }

@ -111,6 +111,14 @@ public interface CouponDiscountPackageService {
void deleteDetail(Integer id); void deleteDetail(Integer id);
/**
* @MethodName giveDiscountPackage
* @Description: 赠送优惠券包
* @param discountPackageId
* @param phone
* @Author: Sum1Dream
* @Date: 2024/7/17 下午3:01
*/
void giveDiscountPackage(Integer discountPackageId , String phone); void giveDiscountPackage(Integer discountPackageId , String phone);
} }

@ -182,6 +182,7 @@ public class CouponDiscountPackageServiceImpl implements CouponDiscountPackageSe
discountUserRel = new CouponDiscountUserRel(); discountUserRel = new CouponDiscountUserRel();
discountUserRel.setDiscountId(Long.valueOf(detail.getDiscountId())); discountUserRel.setDiscountId(Long.valueOf(detail.getDiscountId()));
discountUserRel.setDiscountImg(detail.getDiscountImg()); discountUserRel.setDiscountImg(detail.getDiscountImg());
discountUserRel.setPlatformCode(discount.getPlatformCode());
discountUserRel.setDiscountName(detail.getDiscountName()); discountUserRel.setDiscountName(detail.getDiscountName());
discountUserRel.setDiscountCondition(discount.getCondition()); discountUserRel.setDiscountCondition(discount.getCondition());
discountUserRel.setDiscountPrice(discount.getPrice()); discountUserRel.setDiscountPrice(discount.getPrice());

@ -64,6 +64,9 @@ public class CouponDiscountServiceImpl implements CouponDiscountService {
if (StringUtils.isNotBlank(MapUtils.getString(map, "name"))) { if (StringUtils.isNotBlank(MapUtils.getString(map, "name"))) {
criteria.andNameLike("%"+MapUtils.getString(map, "name")+"%"); criteria.andNameLike("%"+MapUtils.getString(map, "name")+"%");
} }
if (MapUtils.getString(map, "platformCode") != null) {
criteria.andPlatformCodeEqualTo(MapUtils.getString(map, "platformCode"));
}
if (MapUtils.getInteger(map, "status") != null) { if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status")); criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
} else { } else {

@ -35,7 +35,6 @@ public class CouponDiscountUserRelServiceImpl implements CouponDiscountUserRelSe
CouponDiscountUserRelExample example = new CouponDiscountUserRelExample(); CouponDiscountUserRelExample example = new CouponDiscountUserRelExample();
CouponDiscountUserRelExample.Criteria criteria = example.createCriteria(); CouponDiscountUserRelExample.Criteria criteria = example.createCriteria();
if (MapUtils.getInteger(map, "userId") != null) { if (MapUtils.getInteger(map, "userId") != null) {
criteria.andUserIdEqualTo(MapUtils.getLong(map, "userId")); criteria.andUserIdEqualTo(MapUtils.getLong(map, "userId"));
} }
@ -43,6 +42,9 @@ public class CouponDiscountUserRelServiceImpl implements CouponDiscountUserRelSe
if (MapUtils.getInteger(map, "status") != null) { if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status")); criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
} }
if (MapUtils.getInteger(map, "platformCode") != null) {
criteria.andPlatformCodeEqualTo(MapUtils.getString(map, "platformCode"));
}
return couponDiscountUserRelMapper.selectByExample(example); return couponDiscountUserRelMapper.selectByExample(example);
} }

@ -26,7 +26,7 @@ public class GoodsBrandServiceImpl implements GoodsBrandService {
@Override @Override
public void update(GoodsBrand GoodsBrand) { public void update(GoodsBrand GoodsBrand) {
goodsBrandMapper.updateByPrimaryKeySelective(GoodsBrand); goodsBrandMapper.updateByPrimaryKey(GoodsBrand);
} }
@Override @Override

@ -89,6 +89,12 @@ public class GoodsTypeServiceImpl implements GoodsTypeService {
if (MapUtils.getInteger(map, "businessType") != null) { if (MapUtils.getInteger(map, "businessType") != null) {
criteria.andBusinessTypeEqualTo(MapUtils.getInteger(map, "businessType")); criteria.andBusinessTypeEqualTo(MapUtils.getInteger(map, "businessType"));
} }
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
} else {
criteria.andStatusNotEqualTo(0);
}
example.setOrderByClause("sort asc");
return goodsTypeMapper.selectByExample(example); return goodsTypeMapper.selectByExample(example);
} }

@ -89,6 +89,7 @@ public class BsOrderServiceImpl implements BsOrderService {
private BsProductConfigService productConfigService; private BsProductConfigService productConfigService;
@Override @Override
public BsOrder editData(BsOrder order) { public BsOrder editData(BsOrder order) {
order.setUpdateTime(new Date()); order.setUpdateTime(new Date());

@ -0,0 +1,68 @@
package com.hfkj.service.user;
import com.hfkj.entity.BsUserComplaint;
import java.util.List;
import java.util.Map;
public interface BsUserComplaintService {
/**
* @MethodName create
* @Description: 创建
* @param userComplaint
* @Author: Sum1Dream
* @Date: 2024/7/18 下午5:36
*/
void create(BsUserComplaint userComplaint);
/**
* @MethodName update
* @Description: 更新
* @param userComplaint
* @Author: Sum1Dream
* @Date: 2024/7/18 下午5:36
*/
void update(BsUserComplaint userComplaint);
/**
* @MethodName delete
* @Description: 删除
* @param id
* @param fullDelete
* @Author: Sum1Dream
* @Date: 2024/7/18 下午5:37
*/
void delete(Long id , Boolean fullDelete);
/**
* @MethodName queryDetail
* @Description: 查询详情
* @param id
* @return: com.hfkj.entity.BsUserComplaint
* @Author: Sum1Dream
* @Date: 2024/7/18 下午5:37
*/
BsUserComplaint queryDetail(Long id);
/**
* @MethodName queryDetailByMap
* @Description:
* @param map
* @return: com.hfkj.entity.BsUserComplaint
* @Author: Sum1Dream
* @Date: 2024/7/18 下午5:37
*/
BsUserComplaint queryDetailByMap(Map<String , Object> map);
/**
* @MethodName getList
* @Description: 查询列表
* @param map
* @return: java.util.List<com.hfkj.entity.BsUserComplaint>
* @Author: Sum1Dream
* @Date: 2024/7/18 下午5:37
*/
List<BsUserComplaint> getList(Map<String , Object> map);
}

@ -0,0 +1,68 @@
package com.hfkj.service.user.impl;
import com.hfkj.dao.BsUserComplaintMapper;
import com.hfkj.entity.BsUserComplaint;
import com.hfkj.entity.BsUserComplaintExample;
import com.hfkj.service.user.BsUserComplaintService;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Service("bsUserComplaintService")
public class BsUserComplaintServiceImpl implements BsUserComplaintService {
@Resource
private BsUserComplaintMapper bsUserComplaintMapper;
@Override
public void create(BsUserComplaint userComplaint) {
bsUserComplaintMapper.insert(userComplaint);
}
@Override
public void update(BsUserComplaint userComplaint) {
bsUserComplaintMapper.updateByPrimaryKeySelective(userComplaint);
}
@Override
public void delete(Long id, Boolean fullDelete) {
if (fullDelete) {
bsUserComplaintMapper.deleteByPrimaryKey(id);
} else {
BsUserComplaint bsUserComplaint = queryDetail(id);
bsUserComplaint.setUpdateTime(new Date());
update(bsUserComplaint);
}
}
@Override
public BsUserComplaint queryDetail(Long id) {
return bsUserComplaintMapper.selectByPrimaryKey(id);
}
@Override
public BsUserComplaint queryDetailByMap(Map<String, Object> map) {
return null;
}
@Override
public List<BsUserComplaint> getList(Map<String, Object> map) {
BsUserComplaintExample bsUserComplaintExample = new BsUserComplaintExample();
BsUserComplaintExample.Criteria criteria = bsUserComplaintExample.createCriteria();
if (StringUtils.isNotBlank(MapUtils.getString(map, "name"))) {
criteria.andNameLike("%"+MapUtils.getString(map, "name")+"%");
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "phone"))) {
criteria.andPhoneLike("%"+MapUtils.getString(map, "phone")+"%");
}
return bsUserComplaintMapper.selectByExample(bsUserComplaintExample);
}
}

@ -10,11 +10,15 @@ import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.*; import com.hfkj.common.utils.*;
import com.hfkj.config.WxMaConfig; import com.hfkj.config.WxMaConfig;
import com.hfkj.entity.BsUser; import com.hfkj.entity.BsUser;
import com.hfkj.entity.BsUserComplaint;
import com.hfkj.model.ResponseData; import com.hfkj.model.ResponseData;
import com.hfkj.model.SecUserSessionObject; import com.hfkj.model.SecUserSessionObject;
import com.hfkj.model.UserSessionObject; import com.hfkj.model.UserSessionObject;
import com.hfkj.service.SecUserService; import com.hfkj.service.SecUserService;
import com.hfkj.service.user.BsUserComplaintService;
import com.hfkj.service.user.BsUserService; import com.hfkj.service.user.BsUserService;
import com.hfkj.service.user.impl.BsUserServiceImpl;
import com.hfkj.sysenum.SecUserStatusEnum;
import com.hfkj.sysenum.UserLoginPlatform; import com.hfkj.sysenum.UserLoginPlatform;
import com.hfkj.sysenum.UserLoginType; import com.hfkj.sysenum.UserLoginType;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -52,6 +56,8 @@ public class BsUserController {
private UserCenter userCenter; private UserCenter userCenter;
@Resource @Resource
private RedisUtil redisUtil; private RedisUtil redisUtil;
@Resource
private BsUserComplaintService userComplaintService;
@RequestMapping(value = "/phone", method = RequestMethod.POST) @RequestMapping(value = "/phone", method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ -261,6 +267,53 @@ public class BsUserController {
} }
} }
@RequestMapping(value = "/editUser", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "编辑用户信息")
public ResponseData editUser(@RequestBody BsUser body) {
try {
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class);
BsUser bsUser = userSession.getUser();
bsUser.setHeadImg(body.getHeadImg());
bsUser.setPhone(body.getPhone());
userService.editData(bsUser);
return ResponseMsgUtil.success("修改成功");
} catch (Exception e) {
log.error("LoginController --> wechatMaPhone() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/disable",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "禁用")
public ResponseData disable() {
try {
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class);
// 查询用户详情
BsUser user = userSession.getUser();
if (user == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
user.setStatus(SecUserStatusEnum.status2.getCode());
userService.editData(user);
// 退出当前登录信息
userService.loginOut(new BsUserServiceImpl().token(user));
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/loginOut",method = RequestMethod.POST) @RequestMapping(value="/loginOut",method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ -279,4 +332,33 @@ public class BsUserController {
} }
} }
@RequestMapping(value = "/postComplaint", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "提交意见")
public ResponseData postComplaint(@RequestBody BsUserComplaint body) {
try {
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class);
BsUser bsUser = userSession.getUser();
BsUserComplaint bsUserComplaint = new BsUserComplaint();
bsUserComplaint.setUserId(bsUser.getId());
bsUserComplaint.setContent(body.getContent());
bsUserComplaint.setCreateTime(new Date());
bsUserComplaint.setUpdateTime(new Date());
bsUserComplaint.setPhone(bsUser.getPhone());
bsUserComplaint.setName(bsUser.getName());
userComplaintService.create(bsUserComplaint);
return ResponseMsgUtil.success("成功");
} catch (Exception e) {
log.error("LoginController --> wechatMaPhone() error!", e);
return ResponseMsgUtil.exception(e);
}
}
} }

Loading…
Cancel
Save