框架代码初始化1

main
zhangshengli 4 months ago
parent 43607dfc41
commit 497ce9c141

@ -36,4 +36,19 @@ public enum YesOrNoEnum {
public void setValue(String value) { public void setValue(String value) {
this.value = value; this.value = value;
} }
/**
* valuekey
*
* @return
*/
public static String getKeyName(String value) {
final YesOrNoEnum[] values = YesOrNoEnum.values();
for (YesOrNoEnum order : values) {
if (value.equals(order.getValue())) {
return order.getKey();
}
}
return null;
}
} }

@ -3,6 +3,7 @@ package com.fuint.common.service.impl;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.common.Constants; import com.fuint.common.Constants;
@ -60,7 +61,7 @@ public class OrderServiceImpl extends ServiceImpl<MtOrderMapper, MtOrder> implem
private MtOrderMapper mtOrderMapper; private MtOrderMapper mtOrderMapper;
private MtGoodsMapper mtGoodsMapper; private MtGoodsMapper mtGoodsMapper;
private MtUserMapper mtUserMapper;
private MtOrderGoodsMapper mtOrderGoodsMapper; private MtOrderGoodsMapper mtOrderGoodsMapper;
private MtCartMapper mtCartMapper; private MtCartMapper mtCartMapper;
@ -2237,8 +2238,20 @@ public class OrderServiceImpl extends ServiceImpl<MtOrderMapper, MtOrder> implem
} }
} }
String userName = rowContent.get(6); String userName = rowContent.get(6);
if (ObjectUtil.isNotEmpty(userName)){
MtUser m= mtUserMapper.selectOne(new QueryWrapper<MtUser>().lambda().eq(MtUser::getMobile,userName));
if(ObjectUtil.isNotEmpty(m)){
order.setUserId(m.getId());
}
}
String isVisitor = rowContent.get(7); String isVisitor = rowContent.get(7);
order.setIsVisitor(isVisitor); if(StringUtil.isNotEmpty(isVisitor)){
String keyName = YesOrNoEnum.getKeyName(isVisitor);
if(StringUtil.isNotEmpty(keyName)){
order.setIsVisitor(keyName);
}
}
String amount = rowContent.get(8); String amount = rowContent.get(8);
if(StringUtil.isNotEmpty(amount)){ if(StringUtil.isNotEmpty(amount)){
order.setAmount(new BigDecimal(amount)); order.setAmount(new BigDecimal(amount));

@ -615,7 +615,7 @@ public class BackendOrderController extends BaseController {
* @throws * @throws
*/ */
@ApiOperation(value = "上传文件") @ApiOperation(value = "上传文件")
@RequestMapping(value = "/importData", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") @RequestMapping(value = "/importData", method = RequestMethod.POST)
@CrossOrigin @CrossOrigin
public ResponseObject uploadFile(HttpServletRequest request, @RequestParam("file") MultipartFile file) throws Exception { public ResponseObject uploadFile(HttpServletRequest request, @RequestParam("file") MultipartFile file) throws Exception {
String token = request.getHeader("Access-Token"); String token = request.getHeader("Access-Token");

@ -32,13 +32,13 @@ system.name = \u674E\u5B66\u6B66\u7261\u4E39\u74F7\u5B98\u65B9\u65D7\u8230\u5E97
website.url=https://www.huamar.com/h5/ website.url=https://www.huamar.com/h5/
# \u4E0A\u4F20\u56FE\u7247\u672C\u5730\u5730\u5740 # \u4E0A\u4F20\u56FE\u7247\u672C\u5730\u5730\u5740
#images.root=D:/daima/yshi/fuintBackend/fuint-application/target/classes images.root=/target/classes
images.root=D:/download #images.root=D:/download
images.path=/profile/ #images.path=/profile/
#images.path=/static/uploadImages/ images.path=/static/uploadImages/
# \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D # \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D
images.upload.url=http://192.168.10.110:8999 images.upload.url=http://192.168.10.70:8999
# \u4E0A\u4F20\u56FE\u7247\u5141\u8BB8\u7684\u5927\u5C0F\uFF08\u5355\u4F4D\uFF1AMB\uFF09 # \u4E0A\u4F20\u56FE\u7247\u5141\u8BB8\u7684\u5927\u5C0F\uFF08\u5355\u4F4D\uFF1AMB\uFF09
images.upload.maxSize=5 images.upload.maxSize=5

@ -36,7 +36,7 @@ website.url=https://www.fuint.cn/h5/
images.path=/static/uploadImages/ images.path=/static/uploadImages/
# \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D # \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D
images.upload.url=http://192.168.10.31:8999l images.upload.url=http://192.168.10.31:8999
# \u4E0A\u4F20\u56FE\u7247\u5141\u8BB8\u7684\u5927\u5C0F\uFF08\u5355\u4F4D\uFF1AMB\uFF09 # \u4E0A\u4F20\u56FE\u7247\u5141\u8BB8\u7684\u5927\u5C0F\uFF08\u5355\u4F4D\uFF1AMB\uFF09
images.upload.maxSize=5 images.upload.maxSize=5

@ -1,5 +1,7 @@
package com.fuint.framework.web; package com.fuint.framework.web;
import java.io.Serializable;
/** /**
* *
* *
@ -7,8 +9,8 @@ package com.fuint.framework.web;
* *
* CopyRight https://www.fuint.cn * CopyRight https://www.fuint.cn
*/ */
public class ResponseObject { public class ResponseObject implements Serializable {
private static final long serialVersionUID = 2515641477316172528L;
private int code; private int code;
private String message; private String message;
private Object data; private Object data;

@ -36,7 +36,7 @@ public class MtOrder implements Serializable {
private String payType; private String payType;
@ApiModelProperty("订单模式") @ApiModelProperty("订单模式")
private String orderMode; private String orderMode ;
@ApiModelProperty("订单号") @ApiModelProperty("订单号")
private String orderSn; private String orderSn;
@ -57,7 +57,7 @@ public class MtOrder implements Serializable {
private String verifyCode; private String verifyCode;
@ApiModelProperty("是否游客") @ApiModelProperty("是否游客")
private String isVisitor; private String isVisitor="N";
@ApiModelProperty("订单金额") @ApiModelProperty("订单金额")
private BigDecimal amount; private BigDecimal amount;
@ -90,19 +90,19 @@ public class MtOrder implements Serializable {
private String remark; private String remark;
@ApiModelProperty("创建时间") @ApiModelProperty("创建时间")
private Date createTime; private Date createTime = new Date();
@ApiModelProperty("更新时间") @ApiModelProperty("更新时间")
private Date updateTime; private Date updateTime = new Date();
@ApiModelProperty("订单状态") @ApiModelProperty("订单状态")
private String status; private String status ="B";
@ApiModelProperty("支付时间") @ApiModelProperty("支付时间")
private Date payTime; private Date payTime = new Date();
@ApiModelProperty("支付状态") @ApiModelProperty("支付状态")
private String payStatus; private String payStatus="B";
@ApiModelProperty("操作员工") @ApiModelProperty("操作员工")
private Integer staffId; private Integer staffId;

Loading…
Cancel
Save