Commit 5c9d3cfe authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/dev' into dev

parents 841aa7cd a7d7cea4
......@@ -100,4 +100,5 @@ public class AppUserVo {
@ApiModelProperty(value = "用户会员名称")
private String memberName;
private String password;
}
......@@ -190,21 +190,14 @@ public class AppUserController extends CommonBaseController{
String id = userAuthUtil.getInfoFromToken(userAuthConfig.getToken(request)).getId();
userVo.setUserid(Integer.valueOf(id));
userDetailBiz.updUuserInfoById(userVo);
Integer userid=userVo.getUserid();
if (userid!=null){
AppUserLogin appUserLogin=new AppUserLogin();
appUserLogin.setWxOpenid(userVo.getWxOpenid());
appUserLogin.setUnionid(userVo.getUnionid());
appUserLogin.setOpenid(userVo.getOpenid());
appUserLogin.setId(userid);
appUserLogin.setUsername(userVo.getUsername());
appUserLoginBiz.updateAppuserLogin(appUserLogin);
//支付宝绑定
if (StringUtils.isNotEmpty(userVo.getAliCode()) && userVo.getAliCode().trim().length()>0){
appUserAlipayBiz.getUserInfo(userVo.getAliCode(),request);
}
}
return ObjectRestResponse.succ();
}
@PostMapping(value = "changePwd")
public ObjectRestResponse changePwd(@RequestBody AppUserLogin userVo,HttpServletRequest request) throws Exception {
String id = userAuthUtil.getInfoFromToken(userAuthConfig.getToken(request)).getId();
userVo.setId(Integer.valueOf(id));
appUserLoginBiz.updatePasswordById(userVo);
return ObjectRestResponse.succ();
}
......
......@@ -18,6 +18,9 @@ public class UserOrderDto extends PageParam {
//订单状态:1--创建订单,2--待付款,3--已支付,4--已发货,5--已完成 -1、删除,-2、取消
Integer newStatus;
//审核状态: 1、审核通过,2、审核拒绝
Integer auditStatus;
//商品名称
String name;
......
......@@ -82,6 +82,9 @@ public class FeedbackInfo implements Serializable {
@Column(name = "type")
@ApiModelProperty(value = "1、联系客服,2、意见反馈,3、订单反馈")
private Integer type;
/**
* 客服回复信息
*/
private String responseInfo;
}
......@@ -62,8 +62,26 @@ public class FeedbackInfoBiz extends BaseBiz<FeedbackInfoMapper, FeedbackInfo> {
criteria.andLike("name", "%" + feedbackInfoDto.getKeywords() + "%")
.orLike("phone", "%" + feedbackInfoDto.getKeywords() + "%");
}
example.orderBy("updTime").desc();
PageDataVO<FeedbackInfo> pageDataVO = PageDataVO.pageInfo(query, () -> mapper.selectByExample(example));
return ObjectRestResponse.succ(pageDataVO);
}
/**
* 后台添加回复
* @param feedbackInfo
* @return
*/
public ObjectRestResponse updateObj(FeedbackInfo feedbackInfo) {
if (feedbackInfo == null || feedbackInfo.getId() == null) {
return ObjectRestResponse.paramIsEmpty();
}
FeedbackInfo old = selectById(feedbackInfo.getId());
if (old == null) {
return ObjectRestResponse.createFailedResult(ResultCode.NOTEXIST_CODE, ResultCode.getMsg(ResultCode.NOTEXIST_CODE));
}
old.setResponseInfo(feedbackInfo.getResponseInfo());
updateSelectiveByIdRe(old);
return ObjectRestResponse.succ();
}
}
\ No newline at end of file
......@@ -72,6 +72,22 @@ public class ImageImgStorageBiz extends BaseBiz<ImageImgStorageMapper,ImageImgSt
return ObjectRestResponse.succ();
}
/**
* 更新状态 上下架
* @param imageImgStorage
* @return
*/
public ObjectRestResponse updateStatus(ImageImgStorage imageImgStorage) {
ImageImgStorage old = selectById(imageImgStorage.getId());
if (old == null) {
return ObjectRestResponse.createFailedResult(ResultCode.NOTEXIST_CODE, ResultCode.getMsg(ResultCode.NOTEXIST_CODE));
} else {
BeanUtil.copyProperties(imageImgStorage, old, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
updateSelectiveByIdRe(old);
}
return ObjectRestResponse.succ();
}
/**
* 分页查询图像库信息
* @param imageInformationStorageDto
......
......@@ -112,8 +112,6 @@ public class ImageInfoRelationBiz extends BaseBiz<ImageInfoRelationMapper,ImageI
if (arr == null) {
return new ArrayList<>();
}
Example example = new Example(ImageInfoRelation.class);
example.createCriteria().andIn("id", Arrays.asList(arr));
return mapper.selectByExample(example);
return mapper.getListByIds(Arrays.asList(arr));
}
}
\ No newline at end of file
......@@ -669,11 +669,11 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
if (userOrderDto.getSendType() != null) {
orderInfoCriteria.andEqualTo("sendType", userOrderDto.getSendType());
}
if (userOrderDto.getInvoiceStatus() != null && userOrderDto.getInvoiceStatus() >= 2) {
orderInfoCriteria.andGreaterThan("invoiceStatus", userOrderDto.getInvoiceStatus());
if (userOrderDto.getInvoiceStatus() != null && userOrderDto.getInvoiceStatus() == 2) {
orderInfoCriteria.andIsNotNull("invoiceId");
}
if (userOrderDto.getInvoiceStatus() != null && userOrderDto.getInvoiceStatus() == 1) {
orderInfoCriteria.andEqualTo("invoiceStatus", userOrderDto.getInvoiceStatus());
orderInfoCriteria.andIsNull("invoiceId");
}
if (StringUtils.isNotBlank(userOrderDto.getStartTime()) && StringUtils.isNotBlank(userOrderDto.getEndTime())) {
orderInfoCriteria.andBetween("crtTime", userOrderDto.getStartTime(), userOrderDto.getEndTime());
......@@ -684,6 +684,12 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
if (userOrderDto.getNewStatus() != null) {
orderInfoCriteria.andEqualTo("status", userOrderDto.getNewStatus());
}
if (userOrderDto.getAuditStatus() != null && userOrderDto.getAuditStatus() == 1) {
orderInfoCriteria.andEqualTo("auditStatus", userOrderDto.getAuditStatus());
}
if (userOrderDto.getAuditStatus() != null && userOrderDto.getAuditStatus() == 1) {
orderInfoCriteria.andEqualTo("auditStatus", userOrderDto.getAuditStatus());
}
if (StringUtils.isNotBlank(userOrderDto.getKeywords())) {
orderInfoCriteria.andLike("realName", "%" + userOrderDto.getKeywords() + "%")
.orLike("realName", "%" + userOrderDto.getKeywords() + "%")
......@@ -1026,7 +1032,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
old.setPayTime(new Date());
updateSelectiveByIdRe(old);
//添加通知信息
noticeInfoBiz.addObj("订单" + orderInfo.getOrderNo() + "已支付,待发货", NoticeTypeEnum.ORDER_INFO.getType(), orderInfo.getUserId(), String.valueOf(orderInfo.getOrderId()));
noticeInfoBiz.addObj("订单" + old.getOrderNo() + "已支付,待发货", NoticeTypeEnum.ORDER_INFO.getType(), old.getUserId(), String.valueOf(old.getOrderId()));
return ObjectRestResponse.succ();
}
......
......@@ -66,6 +66,9 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper, Shoppin
@Autowired
NoticeInfoBiz noticeInfoBiz;
@Autowired
ImageInfoRelationBiz imageInfoRelationBiz;
/**
* 添加购物车
*
......@@ -155,15 +158,19 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper, Shoppin
//影像图库
if (OrderTypeEnum.IMAGE_STORAGE.getType().equals(orderInfoDto.getType())) {
ImageImgStorage imageImgStorage = imageImgStorageBiz.selectById(orderInfoDto.getDetailId());
if (imageImgStorage != null) {
ShoppingCartInfo old = selectByUser(appUserDTO.getUserid(), Long.valueOf(imageImgStorage.getId()));
ImageInfoRelation imageInfoRelation = imageInfoRelationBiz.selectById(orderInfoDto.getDetailId());
if (imageInfoRelation != null) {
ShoppingCartInfo old = selectByUser(appUserDTO.getUserid(), Long.valueOf(imageInfoRelation.getId()));
if (old != null) {
return ObjectRestResponse.succ();
//return ObjectRestResponse.createFailedResult(ResultCode.ORDER_GOODS_EXIST, ResultCode.getMsg(ResultCode.ORDER_GOODS_EXIST));
} else {
ImageImgStorage imageImgStorage = imageImgStorageBiz.selectById(imageInfoRelation.getRelationId());
List<ImageInfoRelation> list = new ArrayList<>();
list.add(imageInfoRelation);
imageImgStorage.setImageInfoRelationList(list);
ShoppingCartInfo shoppingCartInfo = new ShoppingCartInfo();
shoppingCartInfo.setDetailId(Long.valueOf(imageImgStorage.getId()));
shoppingCartInfo.setDetailId(Long.valueOf(imageInfoRelation.getId()));
shoppingCartInfo.setDetailJson(JSONObject.toJSONString(imageImgStorage));
shoppingCartInfo.setPrice(orderInfoDto.getPrice());
shoppingCartInfo.setFilePath(orderInfoDto.getFilePath());
......
......@@ -62,7 +62,7 @@ public class WebConfiguration implements WebMvcConfigurer {
"/customForm/**",
"/shoppingCartInfo/**",
"/orderInfo/**",
"/feedback/**",
"/feedbackInfo/**",
"/noticeInfo/**"
};
Collections.addAll(list, urls);
......
......@@ -5,9 +5,7 @@ import com.github.wxiaoqi.security.common.rest.BaseController;
import com.upyuns.platform.rs.website.biz.FeedbackInfoBiz;
import com.upyuns.platform.rs.website.dto.FeedbackInfoDto;
import com.upyuns.platform.rs.website.entity.FeedbackInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("feedbackInfo")
......@@ -17,4 +15,10 @@ public class FeedbackInfoController extends BaseController<FeedbackInfoBiz, Feed
public ObjectRestResponse getAll(FeedbackInfoDto feedbackInfoDto) {
return baseBiz.getAll(feedbackInfoDto);
}
@PostMapping(value = "updateObj")
public ObjectRestResponse updateObj(@RequestBody FeedbackInfo feedbackInfo) {
return baseBiz.updateObj(feedbackInfo);
}
}
\ No newline at end of file
......@@ -27,4 +27,10 @@ public class ImageImgStorageController extends BaseController<ImageImgStorageBiz
public ObjectRestResponse getDetail(@PathVariable Integer id) {
return baseBiz.getDetail(id);
}
@PostMapping(value = "updateStatus")
public ObjectRestResponse updateStatus(@RequestBody ImageImgStorage imageImgStorage) {
return baseBiz.updateStatus(imageImgStorage);
}
}
\ No newline at end of file
package com.upyuns.platform.rs.website.controller.web;
import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.upyuns.platform.rs.website.biz.FeedbackInfoBiz;
import com.upyuns.platform.rs.website.dto.FeedbackInfoDto;
import com.upyuns.platform.rs.website.entity.FeedbackInfo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("feedbackInfo/web")
public class FeedbackInfoWebController extends BaseController<FeedbackInfoBiz,FeedbackInfo> {
public class FeedbackInfoWebController extends BaseController<FeedbackInfoBiz,FeedbackInfo> implements UserRestInterface {
@Autowired
UserFeign userFeign;
@PostMapping(value = "addObj")
public ObjectRestResponse addObj(@RequestBody FeedbackInfo feedbackInfo) {
return baseBiz.addObj(feedbackInfo);
}
@GetMapping(value = "getAll")
public ObjectRestResponse getAll(FeedbackInfoDto feedbackInfoDto) {
feedbackInfoDto.setUserId(Integer.parseInt(getCurrentUserId()));
return baseBiz.getAll(feedbackInfoDto);
}
@Override
public UserFeign getUserFeign() {
return userFeign;
}
}
\ No newline at end of file
......@@ -3,6 +3,8 @@ package com.upyuns.platform.rs.website.mapper;
import com.upyuns.platform.rs.website.entity.ImageInfoRelation;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
/**
* 影像图库上传图片关联信息
*
......@@ -11,5 +13,5 @@ import tk.mybatis.mapper.common.Mapper;
* @date 2020-12-04 14:38:23
*/
public interface ImageInfoRelationMapper extends Mapper<ImageInfoRelation> {
List<ImageInfoRelation> getListByIds(List<String> list);
}
......@@ -3,4 +3,14 @@
<mapper namespace="com.upyuns.platform.rs.website.mapper.ImageInfoRelationMapper">
<select id="getListByIds" resultType="com.upyuns.platform.rs.website.entity.ImageInfoRelation">
select iir.* from image_info_relation iir
LEFT JOIN image_img_storage iis on iir.relation_id = iis.id
where iir.id in
<foreach collection="list" item="emp" index="index" open="(" close=")" separator=",">
#{emp}
</foreach>
and iis.`status` = 1
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment