update 自定义二维码前缀

This commit is contained in:
2023-04-07 09:18:31 +08:00
parent 291bd06330
commit c9f586ccdd
4 changed files with 30 additions and 24 deletions

View File

@@ -19,7 +19,6 @@ import com.jsowell.pile.service.IPileBillingTemplateService;
import com.jsowell.pile.service.IPileStationInfoService;
import com.jsowell.pile.vo.web.BillingTemplateVO;
import com.jsowell.pile.vo.web.PileDetailVO;
import com.jsowell.pile.vo.web.PileStationVO;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -111,11 +110,13 @@ public class PileRemoteService {
* @param pileSn 充电桩sn
*/
public void issueQRCode(String pileSn) {
issueQRCode(pileSn, null);
}
public void issueQRCode(String pileSn, String qrcodePrefix) {
IssueQRCodeCommand command = IssueQRCodeCommand.builder().pileSn(pileSn).build();
// 查询充电站info
PileStationVO pileStationVO = pileStationInfoService.getStationInfoByPileSn(pileSn);
if (StringUtils.isNotBlank(pileStationVO.getQrcodePrefix())) {
command.setQrcodePrefix(pileStationVO.getQrcodePrefix());
if (StringUtils.isNotBlank(qrcodePrefix)) {
command.setQrcodePrefix(qrcodePrefix);
}
ykcPushCommandService.pushIssueQRCodeCommand(command);
}