Commit c6311946 by 张新旗

什么时候是个头,是个头

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