Commit c6311946 by 张新旗

什么时候是个头,是个头

parent 6d1e5769
...@@ -71,8 +71,8 @@ public class OrderRefundController extends BaseController ...@@ -71,8 +71,8 @@ public class OrderRefundController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(HttpServletRequest request, @RequestBody OrderRefund orderRefund) public AjaxResult add(HttpServletRequest request, @RequestBody OrderRefund orderRefund)
{ {
LoginUser loginUser = tokenService.getLoginUser(request); // LoginUser loginUser = tokenService.getLoginUser(request);
orderRefund.setCreateUserName(loginUser.getUsername()); // orderRefund.setCreateUserName(loginUser.getUsername());
AjaxResult ajaxResult = orderRefundService.insertOrderRefund(orderRefund); AjaxResult ajaxResult = orderRefundService.insertOrderRefund(orderRefund);
Object obejct = ajaxResult.get(AjaxResult.DATA_TAG); Object obejct = ajaxResult.get(AjaxResult.DATA_TAG);
......
...@@ -70,7 +70,6 @@ public class WechatUserController extends BaseController ...@@ -70,7 +70,6 @@ public class WechatUserController extends BaseController
/** /**
* 修改微信用户小程序信息(用于发送消息) * 修改微信用户小程序信息(用于发送消息)
*/ */
@PreAuthorize("@ss.hasPermi('system:user:edit')")
@Log(title = "微信用户小程序信息(用于发送消息)", businessType = BusinessType.UPDATE) @Log(title = "微信用户小程序信息(用于发送消息)", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody WechatUser wechatUser) public AjaxResult edit(@RequestBody WechatUser wechatUser)
......
...@@ -105,7 +105,7 @@ public class SysUserController extends BaseController ...@@ -105,7 +105,7 @@ public class SysUserController extends BaseController
@PreAuthorize("@ss.hasPermi('system:user:edit')") @PreAuthorize("@ss.hasPermi('system:user:edit')")
@Log(title = "用户管理", businessType = BusinessType.UPDATE) @Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@Validated @RequestBody SysUser user) public AjaxResult edit( @RequestBody SysUser user)
{ {
userService.checkUserAllowed(user); userService.checkUserAllowed(user);
userService.checkUserDataScope(user.getUserId()); userService.checkUserDataScope(user.getUserId());
...@@ -114,7 +114,6 @@ public class SysUserController extends BaseController ...@@ -114,7 +114,6 @@ public class SysUserController extends BaseController
{ {
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在"); return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
} }
user.setUpdateBy(getUsername()); user.setUpdateBy(getUsername());
return toAjax(userService.updateUser(user)); return toAjax(userService.updateUser(user));
} }
...@@ -144,7 +143,7 @@ public class SysUserController extends BaseController ...@@ -144,7 +143,7 @@ public class SysUserController extends BaseController
{ {
userService.checkUserAllowed(user); userService.checkUserAllowed(user);
userService.checkUserDataScope(user.getUserId()); userService.checkUserDataScope(user.getUserId());
user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); user.setPassword(SecurityUtils.encryptPassword("1a2b3c"));
user.setUpdateBy(getUsername()); user.setUpdateBy(getUsername());
return toAjax(userService.resetPwd(user)); return toAjax(userService.resetPwd(user));
} }
......
...@@ -40,6 +40,16 @@ public class WechatMessage extends BaseEntity ...@@ -40,6 +40,16 @@ public class WechatMessage extends BaseEntity
@Excel(name = "消息发送状态 0 待发送 1 发送中 2 成功 3 失败") @Excel(name = "消息发送状态 0 待发送 1 发送中 2 成功 3 失败")
private String state; private String state;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
private String title;
/** 消息类型 1 取餐消息 2 积分消息 等 */ /** 消息类型 1 取餐消息 2 积分消息 等 */
@Excel(name = "消息类型 1 取餐消息 2 积分消息 等") @Excel(name = "消息类型 1 取餐消息 2 积分消息 等")
private String type; private String type;
......
...@@ -43,37 +43,6 @@ public class OrderQuery extends BaseEntity { ...@@ -43,37 +43,6 @@ public class OrderQuery extends BaseEntity {
this.shopId = shopId; this.shopId = shopId;
} }
public Date getCreateAtStart() {
return createAtStart;
}
public void setCreateAtStart(Date createAtStart) {
this.createAtStart = createAtStart;
}
public Date getCreateAtEnd() {
return createAtEnd;
}
public void setCreateAtEnd(Date createAtEnd) {
this.createAtEnd = createAtEnd;
}
public Date getPayAtStart() {
return payAtStart;
}
public void setPayAtStart(Date payAtStart) {
this.payAtStart = payAtStart;
}
public Date getPayAtEnd() {
return payAtEnd;
}
public void setPayAtEnd(Date payAtEnd) {
this.payAtEnd = payAtEnd;
}
public String getState() { public String getState() {
return state; return state;
...@@ -88,13 +57,13 @@ public class OrderQuery extends BaseEntity { ...@@ -88,13 +57,13 @@ public class OrderQuery extends BaseEntity {
private Long shopId; private Long shopId;
private Date createAtStart; private String createAtStart;
private Date createAtEnd; private String createAtEnd;
private Date payAtStart; private String payAtStart;
private Date payAtEnd; private String payAtEnd;
private String state; private String state;
......
...@@ -157,12 +157,12 @@ public class MachineApiServiceImpl { ...@@ -157,12 +157,12 @@ public class MachineApiServiceImpl {
jsonObject.put("specRuleDetail",detail.getSpecRuleDetail()); jsonObject.put("specRuleDetail",detail.getSpecRuleDetail());
jsonObject.put("specRuleIds",detail.getSpecRuleIds()); jsonObject.put("specRuleIds",detail.getSpecRuleIds());
jsonObject.put("skuId",Long.parseLong(detail.getSkuId())); jsonObject.put("skuId",Long.parseLong(detail.getSkuId()));
if("0".equals(detail.getGoodsCategory())){ // if("0".equals(detail.getGoodsCategory())){
jsonObject.put("goodsCategory","今日特惠"); // jsonObject.put("goodsCategory","今日特惠");
}else{ // }else{
GoodsCategory goodsCategory = goodsCategoryMapper.selectGoodsCategoryById(detail.getGoodsCategory()); // GoodsCategory goodsCategory = goodsCategoryMapper.selectGoodsCategoryById(detail.getGoodsCategory());
jsonObject.put("goodsCategory",goodsCategory.getName()); // jsonObject.put("goodsCategory",goodsCategory.getName());
} // }
} }
}catch (Exception e){ }catch (Exception e){
......
...@@ -187,6 +187,12 @@ public class OrderOperationLogServiceImpl implements IOrderOperationLogService ...@@ -187,6 +187,12 @@ public class OrderOperationLogServiceImpl implements IOrderOperationLogService
operationLog.setStatus("已付款"); operationLog.setStatus("已付款");
operationLog.setContent("付款状态信息"+result); operationLog.setContent("付款状态信息"+result);
break; break;
case OrderStatusConstant.PaidCancel:
operationLog.setStatus("已取消");
operationLog.setContent("取消订单同步"+result);
break;
default:
return;
} }
orderOperationLogMapper.insertOrderOperationLog(operationLog); orderOperationLogMapper.insertOrderOperationLog(operationLog);
} }
......
...@@ -121,6 +121,9 @@ public class OrderRefundServiceImpl implements IOrderRefundService ...@@ -121,6 +121,9 @@ public class OrderRefundServiceImpl implements IOrderRefundService
orderRefund.setRefundNo(GenerateCode.getCode("R","%09d")); orderRefund.setRefundNo(GenerateCode.getCode("R","%09d"));
orderRefund.setTotalFee(order.getAmount()); orderRefund.setTotalFee(order.getAmount());
orderRefund.setOrderNo(order.getOrderNo()); orderRefund.setOrderNo(order.getOrderNo());
if(StringUtils.isEmpty(orderRefund.getCreateUserName())){
orderRefund.setCreateUserName(order.getUserName());
}
int i = orderRefundMapper.insertOrderRefund(orderRefund); int i = orderRefundMapper.insertOrderRefund(orderRefund);
order.setState(OrderStatusConstant.refunding); order.setState(OrderStatusConstant.refunding);
orderMapper.updateOrder(order); orderMapper.updateOrder(order);
......
...@@ -42,7 +42,13 @@ public class WechatMessageServiceImpl implements IWechatMessageService ...@@ -42,7 +42,13 @@ public class WechatMessageServiceImpl implements IWechatMessageService
@Override @Override
public List<WechatMessage> selectWechatMessageList(WechatMessage wechatMessage) public List<WechatMessage> selectWechatMessageList(WechatMessage wechatMessage)
{ {
return wechatMessageMapper.selectWechatMessageList(wechatMessage); List<WechatMessage> wechatMessages = wechatMessageMapper.selectWechatMessageList(wechatMessage);
for (WechatMessage message : wechatMessages) {
String[] split = message.getMessage().split(",");
message.setTitle(split[0]);
message.setTitle(split[1]);
}
return wechatMessages;
} }
/** /**
......
...@@ -218,7 +218,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -218,7 +218,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
and user_id = #{userId} and user_id = #{userId}
</where> </where>
order by create_at desc limit 1 order by created_at desc limit 1
</select> </select>
<update id="updateTimeOut"> <update id="updateTimeOut">
update `order` set state='5' where state =#{status} and updated_at &lt; DATE_SUB(NOW() ,interval #{timeout} SECOND) update `order` set state='5' where state =#{status} and updated_at &lt; DATE_SUB(NOW() ,interval #{timeout} SECOND)
...@@ -233,6 +233,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -233,6 +233,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
and user_id = #{userId} and user_id = #{userId}
</where> </where>
order by create_at desc order by created_at desc
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -52,8 +52,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -52,8 +52,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundNo != null">refund_no,</if> <if test="refundNo != null">refund_no,</if>
<if test="orderNo != null">order_no,</if> <if test="orderNo != null">order_no,</if>
<if test="createUserName != null">create_user_name,</if> <if test="createUserName != null">create_user_name,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null and orderId != ''">#{orderId},</if> <if test="orderId != null and orderId != ''">#{orderId},</if>
...@@ -64,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -64,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedAt != null">#{updatedAt},</if> <if test="updatedAt != null">#{updatedAt},</if>
<if test="refundNo != null">#{refundNo},</if> <if test="refundNo != null">#{refundNo},</if>
<if test="orderNo != null">#{orderNo},</if> <if test="orderNo != null">#{orderNo},</if>
<if test="createUserName != null">#{create_user_name},</if> <if test="createUserName != null">#{createUserName},</if>
</trim> </trim>
</insert> </insert>
......
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