This commit is contained in:
cun-nan 2024-03-04 14:25:20 +08:00
parent 2acc8efe2c
commit 6e2e6830ed
19 changed files with 120 additions and 31 deletions

View File

@ -775,8 +775,17 @@ export default {
}
if (this.ids && this.ids.length>0){
editStatus({ids:this.ids.toString(),status:val}).then(res => {
this.$message.success(name+"成功")
this.getList();
if (val=='qy') {
if (res.data > 0) {
this.$message.success(name + "成功")
this.getList();
} else {
this.$message.error("请确保上架的商品库存大于0且为商品设置零售价和会员价")
}
}else {
this.$message.success(name + "成功")
this.getList();
}
})
}else {
this.$message.error("请选择需要"+name+"的商品")

View File

@ -1171,6 +1171,10 @@ export default {
},
//
handleAddMembers() {
if (this.fixingLevelList.length==0){
this.$message.error("请先设置企业会员等级")
return;
}
this.openMembers = true;
this.title = "批量用户认证";
},

View File

@ -788,6 +788,7 @@ export default {
this.openUser = false;
this.getList();
this.getUserList();
});
}
})

View File

@ -4,7 +4,7 @@
<el-alert
title="说明"
type="error"
description="为了保证加油站商户日常在线支付业务的稳定性油客里里目前支持多通道支付
description="为了保证加油站商户日常在线支付业务的稳定性来个油惠目前支持多通道支付
可以有效的避免单支付通道带来不稳定性从而造成油站不能正常支付问题
加油站一旦出现不能正常支付的情况可以随时手工切换支付通道来保证加油站支付收款业务"
:closable="false"

View File

@ -685,7 +685,7 @@ export default {
}
if (!this.form.id) {
queryStaff({mobile:this.form.mobile}).then( response => {
if(response.data!=null){
if(response.data){
this.$modal.msgError("手机号已存在");
}else {
this.form.posPrem = JSON.stringify(this.form.posPrem);
@ -696,6 +696,8 @@ export default {
this.open = false;
this.checked = false;
this.getList();
}else {
this.$modal.msgError("新增失败");
}
});
}

View File

@ -4,7 +4,7 @@
<el-alert
title="说明"
type="error"
description="为了保证加油站商户日常在线支付业务的稳定性油客里里目前支持多通道支付
description="为了保证加油站商户日常在线支付业务的稳定性来个油惠目前支持多通道支付
可以有效的避免单支付通道带来不稳定性从而造成油站不能正常支付问题
加油站一旦出现不能正常支付的情况可以随时手工切换支付通道来保证加油站支付收款业务"
:closable="false"

View File

@ -146,8 +146,7 @@ public class LJGoodsController extends BaseController {
public ResponseObject updateStatus(@RequestBody Map<String,String> map){
String ids = map.get("ids");
String status = map.get("status");
goodsService.batchGrounding(ids,status);
return getSuccessResult("OK");
return getSuccessResult(goodsService.batchGrounding(ids,status));
}
/**

View File

@ -86,7 +86,7 @@ public interface LJGoodsService extends IService<LJGoods> {
* 批量上架下架商品信息
* @param ids
*/
void batchGrounding(String ids,String status);
int batchGrounding(String ids,String status);
/**
* 查询可兑换商品品类下的商品信息

View File

@ -212,8 +212,9 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
}
@Override
public void batchGrounding(String ids,String status) {
public int batchGrounding(String ids,String status) {
String[] split = ids.split(",");
int row = 0;
for (String s : split) {
LJGoods ljGoods = this.selectLJGoodsById(Integer.parseInt(s));
if (ObjectUtil.isNotEmpty(ljGoods)){
@ -224,8 +225,10 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
ljGoods.setStatus(status);
}
this.updateLJGoods(ljGoods);
if (ljGoods.getStatus().equals("qy")) row += 1;
}
}
return row;
}
@Override

View File

@ -276,9 +276,9 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
@Autowired
private RedisLock redisLock;
@Autowired
private StaffCommissionService staffCommissionService;
//
// @Autowired
// private StaffCommissionService staffCommissionService;
private static String beforeLitres = new String("0");
/**
* 查询支付状态 修改相关关联表

View File

@ -176,6 +176,8 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
*/
@Override
public int insertStaff(LJStaff staff) {
LJStaff staff2 = this.selectStaffByMobile(staff.getMobile());
if (ObjectUtil.isNotEmpty(staff2)) return 0;
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
if (ObjectUtil.isNotEmpty(staff.getStoreId())) {

View File

@ -10,6 +10,7 @@ import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.business.storeInformation.service.impl.LJStoreServiceImpl;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
@ -29,6 +30,7 @@ import java.io.*;
* @Version 1.0
*/
@Component
@Slf4j
public class QrCodeUtils {
@Autowired
private ILJStoreService storeService;
@ -67,7 +69,8 @@ public class QrCodeUtils {
//将小图片绘到大图片上,500,300 .表示你的小图片在大图片上的位置
g.drawImage(image, (bufImg.getWidth()-360)/2, 320, null);
// 设置字体样式字体大小
g.setFont(new Font("TimesRoman", Font.BOLD, 40));
// g.setFont(new Font("TimesRoman", Font.BOLD, 40));
g.setFont(chineseFont());
//设置颜色
g.setColor(Color.BLACK);
@ -108,11 +111,40 @@ public class QrCodeUtils {
ImageIO.write(bufImg, "jpg", outImgStream);
outImgStream.flush();
outImgStream.close();
} catch (IOException e) {
} catch (Exception e) {
e.printStackTrace();
}
}
public Font chineseFont() throws Exception {
// 设置中文
Font b = null;
//获取系统字体的路径
String prefixFont = "";
String os = System.getProperties().getProperty("os.name");//获取系统类型
if (os.startsWith("win") || os.startsWith("Win")) {//win下获取字体的路径
prefixFont = "C:\\Windows\\Fonts" + File.separator + "STSONG.TTF";
// Font font = Font.createFont(Font.TRUETYPE_FONT, new ClassPathResource("classpath:font/msyh.ttc").getFile());
// b = font.deriveFont(Font.BOLD, 40);
b = new Font("TimesRoman", Font.BOLD, 40);
} else {
prefixFont = "/usr/share/fonts" + File.separator + "msyh.ttc";
try {
Font font = Font.createFont(Font.TRUETYPE_FONT, new File(prefixFont));
b = font.deriveFont(Font.BOLD, 40);
// b = new Font("msyh", Font.BOLD, 40);
} catch (Exception e) {
//如果发生异常执行默认的字体
b = new Font("msyh", Font.BOLD, 40);
log.error(e.getMessage(),"找不到字体");
}
}
return b;
}
public int returnX(Graphics2D g,Integer bufImgWidth,String name){
FontMetrics fm = g.getFontMetrics();
Rectangle2D stringBounds = fm.getStringBounds(name, g);

View File

@ -5,12 +5,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.userManager.entity.LJUser;
import com.fuint.business.userManager.vo.LJUserVo;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
* 会员信息 业务层
*/
@Transactional
public interface LJUserService extends IService<LJUser> {
/**
* 根据条件分页查询会员信息

View File

@ -43,6 +43,15 @@ export function getUserMobile(data) {
})
}
// 根据手机号查询会员详细
export function getUserPhone(data) {
return request({
url: '/business/userManager/user/phone' ,
method: 'post',
data: data
})
}
// 新增会员
export function addUser(data) {
return request({

View File

@ -28,17 +28,30 @@
/>
</el-form-item>
<el-form-item label="时间">
<!-- <el-date-picker-->
<!-- v-model="dateRange"-->
<!-- style="width: 240px"-->
<!-- size="medium"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- type="daterange"-->
<!-- range-separator="-"-->
<!-- clearable-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- ></el-date-picker>-->
<el-date-picker
v-model="dateRange"
style="width: 240px"
size="medium"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
clearable
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
@ -61,13 +74,13 @@
<el-col :span="2.5">
<div class="box">
<span class="font-chinese">商品数量</span>
<span class="font-number">{{statisticsForm.exchangeQuantity}}</span>
<span class="font-number">{{statisticsForm.exchangeQuantity || 0}}</span>
</div>
</el-col>
<el-col :span="2.5">
<div class="box">
<span class="font-chinese">积分</span>
<span class="font-number">{{statisticsForm.integral}}</span>
<span class="font-number">{{statisticsForm.integral || 0}}</span>
</div>
</el-col>
<el-col :span="3">
@ -78,7 +91,7 @@
<i class="el-icon-info"></i>
</el-tooltip>
</span>
<span class="font-number">{{statisticsForm.amount}}</span>
<span class="font-number">{{statisticsForm.amount || 0}}</span>
</div>
</el-col>
</el-row>
@ -168,6 +181,8 @@ export default {
},
loading: false,
dateRange: [],
beginTime:"",
endTime:"",
defaultSort: {prop: 'createTime', order: 'descending'},
total: 0,
@ -187,6 +202,11 @@ export default {
},
methods: {
getList(){
this.dateRange = []
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
getOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
this.dataList = res.data.records
this.total = res.data.total
@ -194,6 +214,11 @@ export default {
})
},
getStatistics() {
this.dateRange = []
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
getStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
this.statisticsForm = res.data
})
@ -223,6 +248,8 @@ export default {
pageSize:10
},
this.dateRange = []
this.beginTime = ""
this.endTime = ""
this.getList()
this.getStatistics();

View File

@ -452,7 +452,7 @@
addUser,
delUser,
getUser,
getUserMobile,
getUserMobile, getUserPhone,
listStatistic,
listUserStatistic,
updateUser
@ -763,18 +763,16 @@
}
});
} else {
getUserMobile({mobile:this.form.mobile}).then( response => {
getUserPhone({mobile:this.form.mobile}).then( response => {
if(response.data!=null){
this.$modal.msgError("手机号已存在");
}else {
addUser(this.form).then(res => {
if (res.data==1) {
this.$modal.msgSuccess("新增会员成功");
this.open = false;
this.openUser = false;
this.getList();
this.getUserList();
}
});
}
})