定时器,欢迎语

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.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -76,7 +77,8 @@ public class PmnPromotionSrcServiceImpl extends ServiceImpl<PmnPromotionSrcDOMap
private IPmnPromotionSrcService pmnPromotionSrcService;
@Autowired
private IPmnActivityStoreRelationService pmnActivityStoreRelationService;
@Value("debug-staff-code")
private String debugStaffCode;
@Override
@Transactional
public List<PromotionSrcVO> listUserCodes(Long userId) throws Exception {
@ -108,13 +110,13 @@ public class PmnPromotionSrcServiceImpl extends ServiceImpl<PmnPromotionSrcDOMap
for (PmnPromotionSrc src : srcs) {
File codeFile = new File("activity/" + src.getCode() + ".png");
if (!codeFile.exists() || src.getQrCode() == null) {
// String cpUserId = "mayifei";
String cpUserId = staff.getStaffCode();
String url = "";
if (cpUserId != "mayifei") {
url = storeEmployeeService.createActivityQrCode(cpUserId, staff.getStoreCode(), src.getType().intValue(), src.getInstanceId(), src.getPromoterId());
String cpUserId;
if(debugStaffCode == null || debugStaffCode == "") {
cpUserId = staff.getStaffCode();
}else{
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());
src.setQrCode(url);
updateById(src);
@ -202,7 +204,13 @@ public class PmnPromotionSrcServiceImpl extends ServiceImpl<PmnPromotionSrcDOMap
status = 2L;
}
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);
// if (url == null || url.length() <= 0) {

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

@ -53,3 +53,4 @@ bsd:
qrCode: http://10.101.10.24:80/BSD_WXAPP/qyWechat/getShareQRcode?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=
debug-staff-code:

Loading…
Cancel
Save