定时器,欢迎语

dev
zhenghuang 5 years ago
parent b259f33661
commit 4d3822eb3e

@ -35,6 +35,7 @@ import org.apache.commons.io.FileUtils;
import org.apache.shiro.crypto.hash.SimpleHash; import org.apache.shiro.crypto.hash.SimpleHash;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -76,7 +77,8 @@ public class PmnPromotionSrcServiceImpl extends ServiceImpl<PmnPromotionSrcDOMap
private IPmnPromotionSrcService pmnPromotionSrcService; private IPmnPromotionSrcService pmnPromotionSrcService;
@Autowired @Autowired
private IPmnActivityStoreRelationService pmnActivityStoreRelationService; private IPmnActivityStoreRelationService pmnActivityStoreRelationService;
@Value("debug-staff-code")
private String debugStaffCode;
@Override @Override
@Transactional @Transactional
public List<PromotionSrcVO> listUserCodes(Long userId) throws Exception { public List<PromotionSrcVO> listUserCodes(Long userId) throws Exception {
@ -108,13 +110,13 @@ public class PmnPromotionSrcServiceImpl extends ServiceImpl<PmnPromotionSrcDOMap
for (PmnPromotionSrc src : srcs) { for (PmnPromotionSrc src : srcs) {
File codeFile = new File("activity/" + src.getCode() + ".png"); File codeFile = new File("activity/" + src.getCode() + ".png");
if (!codeFile.exists() || src.getQrCode() == null) { if (!codeFile.exists() || src.getQrCode() == null) {
// String cpUserId = "mayifei"; String cpUserId;
String cpUserId = staff.getStaffCode(); if(debugStaffCode == null || debugStaffCode == "") {
String url = ""; cpUserId = staff.getStaffCode();
if (cpUserId != "mayifei") { }else{
url = storeEmployeeService.createActivityQrCode(cpUserId, staff.getStoreCode(), src.getType().intValue(), src.getInstanceId(), src.getPromoterId()); cpUserId = debugStaffCode;
} }
if(url == "") url = "https://wework.qpic.cn/wwpic/789548_SW5hhAm-TgyEW0F_1590128879/0"; String url = storeEmployeeService.createActivityQrCode(cpUserId, staff.getStoreCode(), src.getType().intValue(), src.getInstanceId(), src.getPromoterId());
saveCodeFile(url, src.getCode()); saveCodeFile(url, src.getCode());
src.setQrCode(url); src.setQrCode(url);
updateById(src); updateById(src);
@ -202,7 +204,13 @@ public class PmnPromotionSrcServiceImpl extends ServiceImpl<PmnPromotionSrcDOMap
status = 2L; status = 2L;
} }
saveSrc.setStatus(status); saveSrc.setStatus(status);
String url = storeEmployeeService.createActivityQrCode(staff.getStaffCode(), staff.getStoreCode(), 3, instanceId, promoterId); String cpUserId;
if(debugStaffCode == null || debugStaffCode == "") {
cpUserId = staff.getStaffCode();
}else{
cpUserId = debugStaffCode;
}
String url = storeEmployeeService.createActivityQrCode(cpUserId, staff.getStoreCode(), 3, instanceId, promoterId);
// String url = storeEmployeeService.createActivityQrCode("mayifei", staff.getStoreCode(), 3, instanceId, promoterId); // String url = storeEmployeeService.createActivityQrCode("mayifei", staff.getStoreCode(), 3, instanceId, promoterId);
// if (url == null || url.length() <= 0) { // if (url == null || url.length() <= 0) {

@ -59,6 +59,7 @@ bsd:
qrCode: http://vtest.bsd.cn/BSD_WXAPP/qyWechat/getShareQRcode?token= qrCode: http://vtest.bsd.cn/BSD_WXAPP/qyWechat/getShareQRcode?token=
userBehavior: http://vtest.bsd.cn/BSD_WXAPP/qyWechat/getUserBehaviorData?token= userBehavior: http://vtest.bsd.cn/BSD_WXAPP/qyWechat/getUserBehaviorData?token=
cancelQrCode: http://vtest.bsd.cn/BSD_WXAPP/qyWechat/cancelShareQRcode?token= cancelQrCode: http://vtest.bsd.cn/BSD_WXAPP/qyWechat/cancelShareQRcode?token=
debug-staff-code: mayifei

@ -52,4 +52,5 @@ bsd:
vip: http://10.101.10.24:80/BSD_WXAPP/miniProgram/getMemberDtlByUnionId?token= vip: http://10.101.10.24:80/BSD_WXAPP/miniProgram/getMemberDtlByUnionId?token=
qrCode: http://10.101.10.24:80/BSD_WXAPP/qyWechat/getShareQRcode?token= qrCode: http://10.101.10.24:80/BSD_WXAPP/qyWechat/getShareQRcode?token=
userBehavior: http://10.101.10.24:80/BSD_WXAPP/qyWechat/getUserBehaviorData?token= userBehavior: http://10.101.10.24:80/BSD_WXAPP/qyWechat/getUserBehaviorData?token=
cancelQrCode: http://10.101.10.24:80/BSD_WXAPP/qyWechat/cancelShareQRcode?token= cancelQrCode: http://10.101.10.24:80/BSD_WXAPP/qyWechat/cancelShareQRcode?token=
debug-staff-code:

Loading…
Cancel
Save