通知中心接口完善
This commit is contained in:
@@ -10,6 +10,7 @@ import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.account.entity.SyncNotice;
|
||||
import com.czg.account.service.SyncNoticeService;
|
||||
import com.czg.service.account.mapper.SyncNoticeMapper;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@@ -20,17 +21,35 @@ import java.util.List;
|
||||
* @author zs
|
||||
* @since 2025-04-07
|
||||
*/
|
||||
@Service
|
||||
@DubboService
|
||||
public class SyncNoticeServiceImpl extends ServiceImpl<SyncNoticeMapper, SyncNotice> implements SyncNoticeService {
|
||||
|
||||
@Override
|
||||
public void addNotice(Long shopId, Long sysUserId, String name, Long id, Integer type) {
|
||||
public void addNotice(Long shopId, Long sysUserId, String name, Long id, Integer type, Integer operationType) {
|
||||
SyncNotice syncNotice = new SyncNotice();
|
||||
syncNotice.setShopId(shopId);
|
||||
syncNotice.setSysUserId(sysUserId);
|
||||
syncNotice.setName(name);
|
||||
syncNotice.setSourceId(id);
|
||||
syncNotice.setType(type);
|
||||
syncNotice.setOperationType(operationType);
|
||||
String content = switch (operationType) {
|
||||
case 0 -> "新增";
|
||||
case 1 -> "修改";
|
||||
default -> "";
|
||||
};
|
||||
|
||||
switch (type) {
|
||||
case 0:
|
||||
content += "商品";
|
||||
break;
|
||||
case 1:
|
||||
content += "耗材";
|
||||
break;
|
||||
}
|
||||
|
||||
content = StrUtil.format("{}: {}({}), 请及时确认;", content, name, id);
|
||||
syncNotice.setContent(content);
|
||||
save(syncNotice);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user